T - public abstract class AbstractLCMSDataSource<T extends Index<?>> extends AbstractFile implements LCMSDataSource<T>, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
excludeEmptyScans
When set to true, will discard scans with no m/z values.
|
protected long |
parsingTimeout
Timeout In seconds.
|
protected LCMSRunInfo |
runInfo |
protected int |
tasksPerCpuPerBatch
How many spectra each CPU will be given in one batch.
|
BUF_SIZE, path| Constructor and Description |
|---|
AbstractLCMSDataSource(String path)
Create a new source with autoload of spectra disabled.
|
| Modifier and Type | Method and Description |
|---|---|
LCMSRunInfo |
fetchRunInfo()
Gets the run info, parsing it if it yet hasn't been, and caches for reuse.
|
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()
Some ABSciex data has "peaks" tag empty and no "precursor" specified in such cases for MS2 - these are useless.
|
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.
|
close, getBufferedInputStream, getPath, getRandomAccessFileclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfetchIndex, getIndex, getName, parse, parse, parseIndex, parseRunInfo, parseScan, parseSpectrum, releaseMemoryprotected volatile int tasksPerCpuPerBatch
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.protected volatile long parsingTimeout
protected volatile boolean excludeEmptyScans
protected volatile LCMSRunInfo runInfo
public AbstractLCMSDataSource(String path)
path - public LCMSRunInfo getRunInfo()
LCMSDataSourceLCMSDataSource.fetchRunInfo() was called prior.getRunInfo in interface LCMSDataSource<T extends Index<?>>public LCMSRunInfo fetchRunInfo() throws FileParsingException
LCMSDataSourcefetchRunInfo in interface LCMSDataSource<T extends Index<?>>FileParsingExceptionpublic boolean isExcludeEmptyScans()
isExcludeEmptyScans in interface LCMSDataSource<T extends Index<?>>setExcludeEmptyScans(boolean)public void setExcludeEmptyScans(boolean excludeEmptyScans)
setExcludeEmptyScans in interface LCMSDataSource<T extends Index<?>>excludeEmptyScans - default value is falsepublic Integer getNumThreadsForParsing()
setNumThreadsForParsing(Integer) has been called with null parameter before, then
the number of currently available hardware threads is returned.getNumThreadsForParsing in interface LCMSDataSource<T extends Index<?>>public void setNumThreadsForParsing(Integer numThreadsForParsing)
setNumThreadsForParsing in interface LCMSDataSource<T extends Index<?>>numThreadsForParsing - must be greater than zero, if null, defaults to the number of
available processor corespublic int 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.getTasksPerCpuPerBatch in interface LCMSDataSource<T extends Index<?>>public void setTasksPerCpuPerBatch(int tasksPerCpuPerBatch)
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.
WARNING: If you set this parameter to a large number, consider using setParsingTimeout(long) to increase
the allowed processing time for each worker thread.setTasksPerCpuPerBatch in interface LCMSDataSource<T extends Index<?>>tasksPerCpuPerBatch - must be greater than zeropublic long getParsingTimeout()
getParsingTimeout in interface LCMSDataSource<T extends Index<?>>public void setParsingTimeout(long parsingTimeout)
setParsingTimeout in interface LCMSDataSource<T extends Index<?>>parsingTimeout - (in seconds) must be not less than 1 secondCopyright © 2017. All rights reserved.