public class SliceSparseMatrix extends Object
SliceSparseMatrix class is used for slicing the sparse matrix of raw data as per given mz value. slice contains intensities for one mz value for different scans. In this class sparse matrix has been implemented in the form of multikey map. Mz and scan number are keys and object containing Intensities along information like retention time and whether the value is still in matrix or not is the value. Consider Scan numbers as column index and mz values as row index. cell values as object containing Intensities along with other information like retention time and whether the value is still in matrix or not.
Modifier and Type | Class and Description |
---|---|
static class |
SliceSparseMatrix.Triplet
Triplet is used for representing elements of sparse matrix.
|
static class |
SliceSparseMatrix.VerticalSliceDataPoint
This is the data model for getting vertical slice from sparse matrix.
|
Modifier and Type | Field and Description |
---|---|
List<Integer> |
mzValues
mzValues is used to store all the mz values from raw file.
|
Constructor and Description |
---|
SliceSparseMatrix(RawDataFile rawFile)
This constructor takes raw data file and create the triplet map which contains information such
as mz,intensity,rt,scan number
|
SliceSparseMatrix(RawDataFile rawFile,
Predicate<MsScan> msScanPredicate)
This constructor takes raw data file and create the triplet map which contains information such
as mz,intensity,rt,scan number
|
Modifier and Type | Method and Description |
---|---|
SliceSparseMatrix.Triplet |
findNextMaxIntensity()
This method finds next maximum intensity from filterListOfTriplet
|
List<ContinuousWaveletTransform.DataPoint> |
getCWTDataPoint(List<SliceSparseMatrix.Triplet> slice)
This method returns sorted list of ContinuousWaveletTransform.DataPoint object.Object contain
retention time and intensity values.
|
float |
getFinishedPercent(SliceSparseMatrix.Triplet maxIntensityTriplet)
This method tracks progress of algorithm
|
List<SliceSparseMatrix.Triplet> |
getHorizontalSlice(double mz,
int lowerScanBound,
int upperScanBound)
This method returns the MultiKeyMap slice of data for given mz,lowerScanBound,upperScanBound
|
List<SliceSparseMatrix.Triplet> |
getHorizontalSlice(int roundedMZ,
int lowerScanBound,
int upperScanBound)
This method returns the MultiKeyMap slice of data for rounded mz,lowerScanBound,upperScanBound
|
float[] |
getIntensities(ADAP3DPeakDetectionAlgorithm.GoodPeakInfo peak)
This method returns intensity array for detected peak
|
double |
getRetentionTime(int scanNumber)
This method returns retention time for given scan number.
|
float[] |
getRetentionTimeArray(int lowerScanBound,
int upperScanbound)
This method returns retention time array for given upper and lower scan bounds.
|
int |
getSizeOfRawDataFile()
This method returns size of raw data file in terms of total scans.
|
List<SliceSparseMatrix.VerticalSliceDataPoint> |
getVerticalSlice(int scanNumber)
This method returns the List of type VerticalSliceDataPoint for given Scan Number.
|
double |
numOfScans() |
List<SliceSparseMatrix.Triplet> |
removeDataPoints(int roundedmz,
int lowerScanBound,
int upperScanBound)
This method removes data points from whole data set for given mz,lowerscanbound and
upperscanbound
|
List<SliceSparseMatrix.Triplet> |
restoreDataPoints(int roundedmz,
int lowerScanBound,
int upperScanBound)
This method restores data points from whole data set for given mz,lowerscanbound and
upperscanbound
|
int |
roundMZ(double mz)
This method rounds mz value based on roundMz variable
|
void |
setMaxIntensityIndexZero()
This method sets maxIntensityIndex to 0
|
public SliceSparseMatrix(RawDataFile rawFile)
This constructor takes raw data file and create the triplet map which contains information such as mz,intensity,rt,scan number
rawFile
- a RawDataFile
object. This is raw data
file object by which we can pass raw file.public SliceSparseMatrix(RawDataFile rawFile, Predicate<MsScan> msScanPredicate)
This constructor takes raw data file and create the triplet map which contains information such as mz,intensity,rt,scan number
rawFile
- a RawDataFile
object. This is raw data
file object by which we can pass raw file.msScanPredicate
- a Predicate
object. Only MsScan which pass
this predicate will be processed.public List<SliceSparseMatrix.Triplet> getHorizontalSlice(double mz, int lowerScanBound, int upperScanBound)
This method returns the MultiKeyMap slice of data for given mz,lowerScanBound,upperScanBound
mz
- a Double
object. This is original m/z value from raw file.lowerScanBound
- a Integer
object. This is lowest scan number in the
horizontal matrix slice.upperScanBound
- a Integer
object. This is highest scan number in the
horizontal matrix slice.org.apache.commons.collections4.map.MultiKeyMap
object. This object
contains horizontal slice with single m/z value,different scan numbers and different
intensities along with retention time.public List<SliceSparseMatrix.Triplet> getHorizontalSlice(int roundedMZ, int lowerScanBound, int upperScanBound)
This method returns the MultiKeyMap slice of data for rounded mz,lowerScanBound,upperScanBound
roundedMZ
- a Double
object. This is rounded m/z value which is already
multiplied by 10000.lowerScanBound
- a Integer
object. This is lowest scan number in the
horizontal matrix slice.upperScanBound
- a Integer
object. This is highest scan number in the
horizontal matrix slice.org.apache.commons.collections4.map.MultiKeyMap
object. This object
contains horizontal slice with single m/z value,different scan numbers and different
intensities along with retention time.public List<SliceSparseMatrix.VerticalSliceDataPoint> getVerticalSlice(int scanNumber)
This method returns the List of type VerticalSliceDataPoint for given Scan Number.
scanNumber
- a int.SliceSparseMatrix.VerticalSliceDataPoint
list. This is list containing m/z and intensities for one scan number.public SliceSparseMatrix.Triplet findNextMaxIntensity()
This method finds next maximum intensity from filterListOfTriplet
SliceSparseMatrix.Triplet
object. This is element of sparse matrix.public List<ContinuousWaveletTransform.DataPoint> getCWTDataPoint(List<SliceSparseMatrix.Triplet> slice)
This method returns sorted list of ContinuousWaveletTransform.DataPoint object.Object contain retention time and intensity values.
slice
- a org.apache.commons.collections4.map.MultiKeyMap
object. This is
horizontal slice from sparse matrix.SliceSparseMatrix.Triplet
list. This returns list of retention time and
intensities.public List<SliceSparseMatrix.Triplet> removeDataPoints(int roundedmz, int lowerScanBound, int upperScanBound)
This method removes data points from whole data set for given mz,lowerscanbound and upperscanbound
public List<SliceSparseMatrix.Triplet> restoreDataPoints(int roundedmz, int lowerScanBound, int upperScanBound)
This method restores data points from whole data set for given mz,lowerscanbound and upperscanbound
public int roundMZ(double mz)
This method rounds mz value based on roundMz variable
public void setMaxIntensityIndexZero()
This method sets maxIntensityIndex to 0
public int getSizeOfRawDataFile()
This method returns size of raw data file in terms of total scans.
Integer
object. This is total number of scans in raw file.public float[] getRetentionTimeArray(int lowerScanBound, int upperScanbound)
This method returns retention time array for given upper and lower scan bounds.
lowerScanBound
- a int.upperScanbound
- a int.Float
array.public float[] getIntensities(ADAP3DPeakDetectionAlgorithm.GoodPeakInfo peak)
This method returns intensity array for detected peak
peak
- a ADAP3DPeakDetectionAlgorithm.GoodPeakInfo
object.Float
array.public double getRetentionTime(int scanNumber)
This method returns retention time for given scan number.
scanNumber
- a int.Double
object.public float getFinishedPercent(SliceSparseMatrix.Triplet maxIntensityTriplet)
This method tracks progress of algorithm
maxIntensityTriplet
- a SliceSparseMatrix.Triplet
object.Float
object.public double numOfScans()
Copyright © 2019. All rights reserved.