public class MZXMLFile extends AbstractXMLBasedDataSource<MZXMLIndexElement,MZXMLIndex>
readerPoolexcludeEmptyScans, parsingTimeout, runInfo, tasksPerCpuPerBatchBUF_SIZE, path| Constructor and Description |
|---|
MZXMLFile(String path) |
MZXMLFile(String path,
boolean excludeEmptyScans)
MzXML file constructor.
|
| Modifier and Type | Method and Description |
|---|---|
MZXMLIndex |
fetchIndex()
Returns the index, or parses it from the original file and caches for future reuse.
|
protected MZXMLIndex |
fixIndex(MZXMLIndex idx)
The index as it is built by index builder contains offsets of "scan" tags, and their lengths.
|
MZXMLIndex |
getIndex()
Gets the index without an attempt to parse it.
|
IndexBuilder<MZXMLIndexElement> |
getIndexBuilder(IndexBuilder.Info info) |
org.apache.commons.pool2.ObjectPool<javolution.xml.internal.stream.XMLStreamReaderImpl> |
getReaderPool() |
MZXMLMultiSpectraParser |
getSpectraParser(InputStream inputStream,
LCMSDataSubset subset,
org.apache.commons.pool2.ObjectPool<javolution.xml.internal.stream.XMLStreamReaderImpl> readerPool,
Integer numSpectra)
File type specific parser.
|
MZXMLIndex |
parseIndex() |
LCMSRunInfo |
parseRunInfo() |
protected void |
releaseResources()
This method will be called by
AbstractXMLBasedDataSource.releaseMemory() in addition to cleaning up resources,
used by this abstract implementation. |
buildIndex, distributeParseLoad, getName, parse, parse, parseScan, parseSpectrum, readContinuousBatchOfSpectra, releaseMemory, submitParseTasksfetchRunInfo, getNumThreadsForParsing, getParsingTimeout, getRunInfo, getTasksPerCpuPerBatch, isExcludeEmptyScans, setExcludeEmptyScans, setNumThreadsForParsing, setParsingTimeout, setTasksPerCpuPerBatchclose, getBufferedInputStream, getPath, getRandomAccessFilepublic MZXMLFile(String path)
path - Path to the filepublic MZXMLFile(String path, boolean excludeEmptyScans)
path - path to the original file.excludeEmptyScans - if true, will enable the use of advanced memory handling features.public org.apache.commons.pool2.ObjectPool<javolution.xml.internal.stream.XMLStreamReaderImpl> getReaderPool()
public MZXMLIndex getIndex()
LCMSDataSourceLCMSDataSource.fetchIndex() was called before.public MZXMLIndex parseIndex() throws FileParsingException
FileParsingExceptionpublic MZXMLIndex fetchIndex() throws FileParsingException
LCMSDataSourceLCMSDataSource.parseIndex() instead.FileParsingExceptionpublic LCMSRunInfo parseRunInfo() throws FileParsingException
FileParsingExceptionprotected void releaseResources()
AbstractXMLBasedDataSourceAbstractXMLBasedDataSource.releaseMemory() in addition to cleaning up resources,
used by this abstract implementation.
Clean up here anything additional, that your subclass has created, such as a file-type-specific index.releaseResources in class AbstractXMLBasedDataSource<MZXMLIndexElement,MZXMLIndex>public MZXMLMultiSpectraParser getSpectraParser(InputStream inputStream, LCMSDataSubset subset, org.apache.commons.pool2.ObjectPool<javolution.xml.internal.stream.XMLStreamReaderImpl> readerPool, Integer numSpectra)
AbstractXMLBasedDataSourcegetSpectraParser in class AbstractXMLBasedDataSource<MZXMLIndexElement,MZXMLIndex>inputStream - a stream, from which the parser will parse the actual scan. If this stream is some sort of a
FileStream, make sure you use buffering, because reading from the stream in the parser is
normally unbuffered.subset - the only purpose of this subset object is to identify scans, for which spectra should be parsedreaderPool - can be null, then a new reader will be created every time. It is highly recommended to provide
a valid poolnumSpectra - can be null. If you know how many spectra can be parsed from the inputStream, then
pass it here. If set, and this number of spectra was not reached when parsing, an exception will
be thrown.public IndexBuilder<MZXMLIndexElement> getIndexBuilder(IndexBuilder.Info info)
getIndexBuilder in class AbstractXMLBasedDataSource<MZXMLIndexElement,MZXMLIndex>protected MZXMLIndex fixIndex(MZXMLIndex idx)
AbstractXMLBasedDataSourcefixIndex in class AbstractXMLBasedDataSource<MZXMLIndexElement,MZXMLIndex>Copyright © 2017. All rights reserved.