public class EbiMzmlReader<S extends MsnSpectrum> extends Object implements IterativeReader<S>, ConsistencyCheckHandler<MzmlConsistencyCheck>
EMPTY_READER| Constructor and Description |
|---|
EbiMzmlReader(uk.ac.ebi.jmzml.xml.io.MzMLUnmarshaller unmarshaller,
PeakList.Precision precision) |
EbiMzmlReader(uk.ac.ebi.jmzml.xml.io.MzMLUnmarshaller unmarshaller,
PeakList.Precision precision,
PeakProcessorChain<PeakAnnotation> processorChain) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkConsistencies(S spectrum,
uk.ac.ebi.jmzml.model.mzml.Spectrum mzmlSpectrum) |
void |
close()
Closes the reader and releases any system resources associated with
it.
|
protected void |
handleIsolationWindow(double targetMz,
double lowerOffset,
double upperOffset,
S spectrum)
Handle isolation window parameters.
|
protected void |
handleMsLevelAtLeast(uk.ac.ebi.jmzml.model.mzml.Spectrum src,
S dest)
Extract information from mzml spectrum to msn spectrum.
|
boolean |
hasNext()
Returns
true if the reader has more elements. |
protected S |
newSpectrum(PeakList.Precision precision)
Override this method to make an instance of S (MsnSpectrum by default)
|
static EbiMzmlReader |
newStrictReader(uk.ac.ebi.jmzml.xml.io.MzMLUnmarshaller unmarshaller,
PeakList.Precision precision) |
static <S extends MsnSpectrum> |
newStrictReader(uk.ac.ebi.jmzml.xml.io.MzMLUnmarshaller unmarshaller,
PeakList.Precision precision,
PeakProcessorChain<PeakAnnotation> processorChain) |
static <A extends PeakAnnotation> |
newTolerantReader(uk.ac.ebi.jmzml.xml.io.MzMLUnmarshaller unmarshaller,
PeakList.Precision precision) |
static <S extends MsnSpectrum> |
newTolerantReader(uk.ac.ebi.jmzml.xml.io.MzMLUnmarshaller unmarshaller,
PeakList.Precision precision,
PeakProcessorChain<PeakAnnotation> processorChain) |
S |
next()
Returns the next element in the reader.
|
void |
setDelta(float delta)
Set delta value
|
void |
setSpectrumIdParser(SpectrumIdParser spectrumIdParser)
Set parser that extract scan number from spectrum id attribute.
|
int |
size() |
void |
turnStrict(Set<MzmlConsistencyCheck> ccs)
Make these checks strict (throw a ConsistencyCheckException if a check fails)
|
void |
turnTolerant(Set<MzmlConsistencyCheck> ccs)
Make these checks tolerant (log a message if a check fails)
|
public EbiMzmlReader(uk.ac.ebi.jmzml.xml.io.MzMLUnmarshaller unmarshaller,
PeakList.Precision precision)
public EbiMzmlReader(uk.ac.ebi.jmzml.xml.io.MzMLUnmarshaller unmarshaller,
PeakList.Precision precision,
PeakProcessorChain<PeakAnnotation> processorChain)
public static EbiMzmlReader newStrictReader(uk.ac.ebi.jmzml.xml.io.MzMLUnmarshaller unmarshaller, PeakList.Precision precision)
public static <S extends MsnSpectrum> EbiMzmlReader newStrictReader(uk.ac.ebi.jmzml.xml.io.MzMLUnmarshaller unmarshaller, PeakList.Precision precision, PeakProcessorChain<PeakAnnotation> processorChain)
public static <A extends PeakAnnotation> EbiMzmlReader newTolerantReader(uk.ac.ebi.jmzml.xml.io.MzMLUnmarshaller unmarshaller, PeakList.Precision precision)
public static <S extends MsnSpectrum> EbiMzmlReader newTolerantReader(uk.ac.ebi.jmzml.xml.io.MzMLUnmarshaller unmarshaller, PeakList.Precision precision, PeakProcessorChain<PeakAnnotation> processorChain)
public void setDelta(float delta)
ConsistencyCheckHandlersetDelta in interface ConsistencyCheckHandler<MzmlConsistencyCheck>delta - the maximum delta between expected and actual for which both numbers are still considered equal.public void turnTolerant(Set<MzmlConsistencyCheck> ccs)
ConsistencyCheckHandlerturnTolerant in interface ConsistencyCheckHandler<MzmlConsistencyCheck>ccs - consistency checkspublic void turnStrict(Set<MzmlConsistencyCheck> ccs)
ConsistencyCheckHandlerturnStrict in interface ConsistencyCheckHandler<MzmlConsistencyCheck>ccs - consistency checkspublic void setSpectrumIdParser(SpectrumIdParser spectrumIdParser)
spectrumIdParser - the parserpublic int size()
public boolean hasNext()
IterativeReadertrue if the reader has more elements.
(In other words, returns true if IterativeReader.next() would
return an element rather than throwing an exception.)hasNext in interface IterativeReader<S extends MsnSpectrum>true if the reader has more elementsprotected S newSpectrum(PeakList.Precision precision)
precision - peaks precisionpublic S next() throws IOException
IterativeReadernext in interface IterativeReader<S extends MsnSpectrum>IOException - if there is an io exceptionpublic void close()
throws IOException
IterativeReaderclose in interface IterativeReader<S extends MsnSpectrum>IOException - If an I/O error occursprotected void checkConsistencies(S spectrum, uk.ac.ebi.jmzml.model.mzml.Spectrum mzmlSpectrum)
protected void handleMsLevelAtLeast(uk.ac.ebi.jmzml.model.mzml.Spectrum src,
S dest)
src - the mzxml spectrum sourcedest - the msn spectrum destinationprotected void handleIsolationWindow(double targetMz,
double lowerOffset,
double upperOffset,
S spectrum)
targetMz - center of window m/zlowerOffset - lower bound offsetupperOffset - upper bound offsetspectrum - the destination spectrumCopyright © 2016. All Rights Reserved.