public interface IScanCollection extends Serializable
| Modifier and Type | Field and Description |
|---|---|
static StorageStrategy |
DEFAULT_STORAGE_STRATEGY
The storage strategy, that should be used by default by all implementations
of this interface.
|
static double |
MIN_GROUP_OVERLAP
The minimum relative overlap between two spectra's MS1 ranges or MS2 isolation windows, for spectra to be
considered as belonging to the same group.
|
| Modifier and Type | Method and Description |
|---|---|
IScan |
addScan(IScan scan)
Adds a new scan to this collection, maintains all the proper inside mappings.
|
IScan |
createScanStub(int num)
Creates a scan stub, using the right
StorageStrategy. |
LCMSDataSource<?> |
getDataSource() |
StorageStrategy |
getDefaultStorageStrategy() |
TreeMap<Integer,ScanIndex> |
getMapMsLevel2index()
Get a map which links MS Levels (starting from 1) to maps of (scanNum => scanObject)
|
TreeMap<Integer,IntervalST<Double,TreeMap<Integer,IScan>>> |
getMapMsLevel2rangeGroups()
Get a map, holding spectra groupped by precursor m/z isolation window.
|
TreeMap<Integer,IScan> |
getMapNum2scan()
Get a map which links actual scan numbers to instances of Scan objects
|
TreeMap<Double,List<IScan>> |
getMapRt2scan()
Maps retention time (in minutes) to lists of Scan objects.
|
IScan |
getNextScan(int scanNum)
Gets the next scan in the collection (by number).
|
IScan |
getNextScanAtMsLevel(int scanNum,
int msLevel)
Finds the next scan at the same MS level, as the scan with scanNum.
|
IScan |
getNextScanAtSameMsLevel(IScan scan)
Convenience method, calls
getNextScanAtMsLevel(int, int) internally |
IScan |
getPrevScan(int scanNum)
Gets the previous scan in the collection (by number).
|
IScan |
getPrevScanAtMsLevel(int scanNum,
int msLevel)
Finds the next scan at the same MS level, as the scan with scanNum.
|
IScan |
getPrevScanAtSameMsLevel(IScan scan)
Convenience method, calls
getPrevScanAtMsLevel(int, int) internally |
Double |
getRtMax()
RT of the last scan in this scan collection.
|
Double |
getRtMin()
RT of the first scan.
|
LCMSRunInfo |
getRunInfo() |
IScan |
getScanByNum(int scanNum)
The name says it all.
|
IScan |
getScanByNumClosest(int scanNum)
Scan with the closest Number is returned.
|
IScan |
getScanByNumLower(int scanNum)
Scan with closest Number less or equal to the provided one is returned.
|
IScan |
getScanByNumUpper(int scanNum)
Scan with the closest Number greater or equal to the provided one is returned.
|
int |
getScanCount()
Get the total number of scans in this ScansCollection.
|
Integer |
getScanCountAtMsLevel(int msLevel)
If the msLevel doesn't exist in this ScanCollectionDefault, returns null
|
TreeMap<Integer,NavigableMap<Integer,IScan>> |
getScansByNumSpan(int numStart,
int numEnd) |
NavigableMap<Integer,IScan> |
getScansByNumSpanAtMsLevel(int numStart,
int numEnd,
int msLevel)
A view(not a copy!) of the original scan map, containing only scans from numStart to numEnd (inclusive).
|
List<IScan> |
getScansByRt(double rt)
Provided RT MUST be EXACT RT, existing in the map.
|
List<IScan> |
getScansByRtClosest(double rt)
Scans with the closest RT are returned.
|
List<IScan> |
getScansByRtLower(double rt)
Scan List with closest RT less or equal to the provided one are returned.
|
TreeMap<Integer,NavigableMap<Integer,IScan>> |
getScansByRtSpan(double rtStart,
double rtEnd)
Returns a range of scans, whose RT is in the inclusive interval [rtStart; rtEnd].
|
NavigableMap<Integer,IScan> |
getScansByRtSpanAtMsLevel(double rtStart,
double rtEnd,
int msLevel)
Same as
getScansByRtSpan(double, double), but only searches at one MS Level |
List<IScan> |
getScansByRtUpper(double rt)
Scan List with the closest RT greater or equal to the provided one are returned.
|
boolean |
isAutoloadSpectra()
Decides if spectra should be automatically loaded, when a spectrumRef is requested from a Scan, but there is no
spectrumRef present.
|
void |
isAutoloadSpectra(boolean newVal)
Sets the new configuration for spectra autoloading.
|
boolean |
isEmpty()
Tells if the collection has at least one scan in it.
|
void |
loadData(LCMSDataSubset subset)
IMPLEMENTATIONS MUST BE SYNCHRONIZED
Loads spectra for a subset of scans, or all of them, depending on the configuration.
|
void |
loadData(LCMSDataSubset subset,
StorageStrategy storageStrategy)
IMPLEMENTATIONS MUST BE SYNCHRONIZED
Loads spectra for a subset of scans, or all of them, depending on the configuration.
|
void |
reset()
Bring the collection back to initial empty state.
|
void |
setDataSource(LCMSDataSource<?> source)
Set the data source from which the collection will be filled.
|
void |
setDefaultStorageStrategy(StorageStrategy storageStrategy) |
void |
setRunInfo(LCMSRunInfo runInfo) |
void |
setStorageStrategy(LCMSDataSubset subset,
StorageStrategy storageStrategy) |
void |
setStorageStrategy(LCMSDataSubset subset,
StorageStrategy strategyInSet,
StorageStrategy strategyNotInSet) |
void |
unloadData(LCMSDataSubset subset)
IMPLEMENTATIONS MUST BE SYNCHRONIZED
Unloads SPECTRA from the underlying ScanCollection.
|
void |
unloadData(LCMSDataSubset subset,
Set<LCMSDataSubset> exlude)
IMPLEMENTATIONS MUST BE SYNCHRONIZED
Unloads SPECTRA from the underlying ScanCollection.
|
static final StorageStrategy DEFAULT_STORAGE_STRATEGY
LCMSDataSource.static final double MIN_GROUP_OVERLAP
boolean isEmpty()
IScan addScan(IScan scan)
scan - TreeMap<Integer,IScan> getMapNum2scan()
TreeMap<Integer,IntervalST<Double,TreeMap<Integer,IScan>>> getMapMsLevel2rangeGroups()
TreeMap<Integer,ScanIndex> getMapMsLevel2index()
TreeMap<Double,List<IScan>> getMapRt2scan()
IScan getScanByNum(int scanNum)
scanNum - Scan number as it was in the original MS fileIScan getScanByNumLower(int scanNum)
scanNum - scan numberIScan getScanByNumUpper(int scanNum)
scanNum - scan numberIScan getScanByNumClosest(int scanNum)
scanNum - scan numberList<IScan> getScansByRt(double rt)
rt - RT in minutesList<IScan> getScansByRtLower(double rt)
rt - List<IScan> getScansByRtUpper(double rt)
rt - List<IScan> getScansByRtClosest(double rt)
rt - NavigableMap<Integer,IScan> getScansByNumSpanAtMsLevel(int numStart, int numEnd, int msLevel)
numStart - numEnd - msLevel - TreeMap<Integer,NavigableMap<Integer,IScan>> getScansByNumSpan(int numStart, int numEnd)
numStart - Starting scan number (inclusive)numEnd - The last scan number in range (inclusive)NavigableMap<Integer,IScan> getScansByRtSpanAtMsLevel(double rtStart, double rtEnd, int msLevel)
getScansByRtSpan(double, double), but only searches at one MS LevelrtStart - The beginning of RT windowrtEnd - The end of RT windowmsLevel - TreeMap<Integer,NavigableMap<Integer,IScan>> getScansByRtSpan(double rtStart, double rtEnd)
rtStart - The beginning of RT windowrtEnd - The end of RT windowint getScanCount()
getScanCountAtMsLevel(int)Integer getScanCountAtMsLevel(int msLevel)
msLevel - IScan getNextScan(int scanNum)
scanNum - IScan getNextScanAtMsLevel(int scanNum, int msLevel)
scanNum - Scan numbermsLevel - MS Level at which to search for that scan numberIScan getNextScanAtSameMsLevel(IScan scan)
getNextScanAtMsLevel(int, int) internallyscan - an existing scan from THIS ScanCollectionIScan getPrevScan(int scanNum)
scanNum - IScan getPrevScanAtMsLevel(int scanNum, int msLevel)
scanNum - Scan numbermsLevel - MS Level at which to search for that scan numberIScan getPrevScanAtSameMsLevel(IScan scan)
getPrevScanAtMsLevel(int, int) internallyscan - Double getRtMax()
Double getRtMin()
LCMSRunInfo getRunInfo()
void setRunInfo(LCMSRunInfo runInfo)
StorageStrategy getDefaultStorageStrategy()
void setDefaultStorageStrategy(StorageStrategy storageStrategy)
void setStorageStrategy(LCMSDataSubset subset, StorageStrategy storageStrategy)
void setStorageStrategy(LCMSDataSubset subset, StorageStrategy strategyInSet, StorageStrategy strategyNotInSet)
void loadData(LCMSDataSubset subset, StorageStrategy storageStrategy) throws FileParsingException
subset - configuration, for which scans what data should be loaded. Can't be null.
Scans in the range of scan numbers should be loaded, but spectra should be loaded
only for the scans, specified by MS level and m/z ranges.storageStrategy - spectral storage strategy, can be null, in which case the default storage strategy of the
underlying ScanCollection should be usedFileParsingExceptionvoid loadData(LCMSDataSubset subset) throws FileParsingException
subset - configuration, for which scans what data should be loaded. Can't be null.
Scans in the range of scan numbers should be loaded, but spectra should be loaded
only for the scans, specified by MS level and m/z ranges.FileParsingExceptionvoid unloadData(LCMSDataSubset subset)
subset - void unloadData(LCMSDataSubset subset, Set<LCMSDataSubset> exlude)
subset - the subset to be unloadedexlude - a set of LCMSDataSubsets to be excluded from the unloading
operationvoid reset()
LCMSDataSource<?> getDataSource()
void setDataSource(LCMSDataSource<?> source)
source - boolean isAutoloadSpectra()
void isAutoloadSpectra(boolean newVal)
newVal - IScan createScanStub(int num)
StorageStrategy.num - scan numberCopyright © 2017. All rights reserved.