T - index typepublic interface LCMSDataSource<T extends Index<?>>
| Modifier and Type | Method and Description |
|---|---|
T |
fetchIndex()
Returns the index, or parses it from the original file and caches for future reuse.
|
LCMSRunInfo |
fetchRunInfo()
Gets the run info, parsing it if it yet hasn't been, and caches for reuse.
|
T |
getIndex()
Gets the index without an attempt to parse it.
|
String |
getName()
Some identifier for the source, that can be used as its name.
|
Integer |
getNumThreadsForParsing()
How many batches of scans will be processed in parallel.
|
long |
getParsingTimeout()
Timeout (in seconds) that worker threads are allowed for parsing one batch of spectra.
|
LCMSRunInfo |
getRunInfo()
Gets the run info, not attempting to parse it.
|
int |
getTasksPerCpuPerBatch()
How many spectra each CPU will be given in one batch.
|
boolean |
isExcludeEmptyScans() |
List<IScan> |
parse(LCMSDataSubset subset)
Parse a range of scan numbers.
|
List<IScan> |
parse(List<Integer> scanNums)
The storage strategy should always be
StorageStrategy.STRONG,
the receiver then can set it to whatever it needs. |
T |
parseIndex() |
LCMSRunInfo |
parseRunInfo() |
IScan |
parseScan(int num,
boolean parseSpectrum)
Parse a single scan from file on disk by it's number.
|
ISpectrum |
parseSpectrum(int num)
Parse a single spectrumRef from file on disk by it's number.
|
void |
releaseMemory()
The intent is to be able to free the memory, e.g.
|
void |
setExcludeEmptyScans(boolean excludeEmptyScans)
If true, empty scans will be discarded during parsing.
|
void |
setNumThreadsForParsing(Integer numThreadsForParsing)
How many batches of scans will be processed in parallel.
|
void |
setParsingTimeout(long parsingTimeout)
Timeout (in seconds) that worker threads are allowed for parsing one batch of spectra.
|
void |
setTasksPerCpuPerBatch(int tasksPerCpuPerBatch)
How many spectra each CPU will be given in one batch.
|
String getName()
Integer getNumThreadsForParsing()
void setNumThreadsForParsing(Integer numThreadsForParsing)
numThreadsForParsing - must be greater than zerolong getParsingTimeout()
void setParsingTimeout(long parsingTimeout)
parsingTimeout - must be not less than 1 secondint getTasksPerCpuPerBatch()
setNumThreadsForParsing(java.lang.Integer), and set this parameter to 20, then 40 spectra will be read from disk
in one batch and each thread will be given 20 spectra at once for processing.void setTasksPerCpuPerBatch(int tasksPerCpuPerBatch)
setNumThreadsForParsing(Integer), and set this parameter to 20, then 40 spectra will be read from disk
in one batch and each thread will be given 20 spectra at once for processing.
WARNING: If you set this parameter to a large number, consider using setParsingTimeout(long) to increase
the allowed processing time for each worker thread.tasksPerCpuPerBatch - must be greater than zeroboolean isExcludeEmptyScans()
void setExcludeEmptyScans(boolean excludeEmptyScans)
excludeEmptyScans - void releaseMemory()
LCMSRunInfo getRunInfo()
fetchRunInfo() was called prior.LCMSRunInfo fetchRunInfo() throws FileParsingException
FileParsingExceptionLCMSRunInfo parseRunInfo() throws FileParsingException
FileParsingExceptionT getIndex()
fetchIndex() was called before.T fetchIndex() throws FileParsingException
parseIndex() instead.FileParsingExceptionT parseIndex() throws FileParsingException
FileParsingExceptionISpectrum parseSpectrum(int num) throws FileParsingException
num - scan numberFileParsingExceptionIScan parseScan(int num, boolean parseSpectrum) throws FileParsingException
StorageStrategy.STRONG,
the receiver then can set it to whatever it needs.num - scan numberparseSpectrum - if false, the spectrumRef should not be parsed. Can provide significant speed and memory
benefits if you only need scan metadataFileParsingExceptionList<IScan> parse(LCMSDataSubset subset) throws FileParsingException
StorageStrategy.STRONG,
the receiver then can set it to whatever it needs.subset - the region of LC/MS data to be parsed as scansFileParsingExceptionList<IScan> parse(List<Integer> scanNums) throws FileParsingException
StorageStrategy.STRONG,
the receiver then can set it to whatever it needs.scanNums - List of scan numbers to be parsed. All scan numbers MUST be present in the file.FileParsingExceptionIllegalArgumentExceptionCopyright © 2017. All rights reserved.