public class MzxmlReader extends AbstractMsReader<PeakAnnotation,MsnSpectrum>
| Modifier and Type | Class and Description |
|---|---|
static class |
MzxmlReader.ConsistencyCheck |
static class |
MzxmlReader.ConsistencyCheckException |
static class |
MzxmlReader.XMLEventUtils |
AbstractMsReader.ParseContextacceptUnsortedSpectra, precisionEMPTY_READER| Constructor and Description |
|---|
MzxmlReader(File file,
PeakList.Precision precision) |
MzxmlReader(File file,
PeakList.Precision precision,
PeakProcessorChain<PeakAnnotation> processorChain) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConsistencyChecks(Set<MzxmlReader.ConsistencyCheck> ccs) |
void |
close()
Closes the reader and releases any system resources associated with
it.
|
protected void |
consistencyChecks(MsnSpectrum spectrum)
Check for all spectrum consistencies
|
static void |
convert64bitsAndPopulate(byte[] bytes,
double[] mzs,
double[] intensities,
int expectedScanNumber) |
int |
getExpectedScanCount() |
protected void |
init(AbstractMsReader.ParseContext context) |
protected MsnSpectrum |
newSpectrum(StartElement scanElement,
AbstractMsReader.ParseContext context)
Create a spectrum
|
static MzxmlReader |
newStrictReader(File file,
PeakList.Precision precision)
Create an instance of MzxmlReader that strictly checks that the decoded spectrum is consistent with xml
|
static MzxmlReader |
newStrictReader(File file,
PeakList.Precision precision,
PeakProcessorChain<PeakAnnotation> processorChain)
Create an instance of MzxmlReader that strictly checks that the decoded spectrum is consistent with xml
|
static MzxmlReader |
newTolerantReader(File file,
PeakList.Precision precision)
Create an instance of MzxmlReader that does not check for inconsistencies
|
MsnSpectrum |
next()
Returns the next element in the reader.
|
protected String |
parseHeader(AbstractMsReader.ParseContext context)
This is called on reader initialization.
|
protected MsnSpectrum |
parseNextEntry(AbstractMsReader.ParseContext context) |
void |
removeConsistencyChecks(Set<MzxmlReader.ConsistencyCheck> ccs) |
void |
setDelta(float delta) |
acceptUnsortedSpectra, addPeaksToSpectrum, addPeakToSpectrum, getContext, getHeader, hasNextpublic MzxmlReader(File file, PeakList.Precision precision) throws IOException
IOExceptionpublic MzxmlReader(File file, PeakList.Precision precision, PeakProcessorChain<PeakAnnotation> processorChain) throws IOException
IOExceptionpublic static MzxmlReader newStrictReader(File file, PeakList.Precision precision) throws IOException
file - the mzxml file to readprecision - the peak precisionIOExceptionpublic static MzxmlReader newStrictReader(File file, PeakList.Precision precision, PeakProcessorChain<PeakAnnotation> processorChain) throws IOException
file - the mzxml file to readprecision - the peak precisionprocessorChain - PeakProcessorChain to process the peaks while readingIOExceptionpublic static MzxmlReader newTolerantReader(File file, PeakList.Precision precision) throws IOException
file - the mzxml file to readprecision - the peak precisionIOExceptionpublic void removeConsistencyChecks(Set<MzxmlReader.ConsistencyCheck> ccs)
public void addConsistencyChecks(Set<MzxmlReader.ConsistencyCheck> ccs)
protected void init(AbstractMsReader.ParseContext context) throws IOException
init in class AbstractMsReader<PeakAnnotation,MsnSpectrum>IOExceptionpublic void setDelta(float delta)
public void close()
throws IOException
IterativeReaderclose in interface IterativeReader<MsnSpectrum>close in class AbstractMsReader<PeakAnnotation,MsnSpectrum>IOException - If an I/O error occursprotected String parseHeader(AbstractMsReader.ParseContext context) throws IOException
AbstractMsReaderparseHeader in class AbstractMsReader<PeakAnnotation,MsnSpectrum>context - the parser contextIOExceptionpublic int getExpectedScanCount()
public MsnSpectrum next() throws IOException
IterativeReadernext in interface IterativeReader<MsnSpectrum>next in class AbstractMsReader<PeakAnnotation,MsnSpectrum>IOException - if there is an io exceptionprotected MsnSpectrum parseNextEntry(AbstractMsReader.ParseContext context) throws IOException
parseNextEntry in class AbstractMsReader<PeakAnnotation,MsnSpectrum>IOExceptionprotected void consistencyChecks(MsnSpectrum spectrum)
spectrum - the spectrum on which checks are doneIllegalStateException - if xml stream errorMzxmlReader.ConsistencyCheckException - if a check reveals inconsistenciesprotected MsnSpectrum newSpectrum(StartElement scanElement, AbstractMsReader.ParseContext context) throws XMLStreamException
scanElement - the container providing data to spectrumXMLStreamExceptionpublic static void convert64bitsAndPopulate(byte[] bytes,
double[] mzs,
double[] intensities,
int expectedScanNumber)
Copyright © 2016. All Rights Reserved.