|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object peakml.Annotatable peakml.IPeak peakml.MassChromatogram<gPeak>
gPeak
- The type of peaks stored in this mass chromatogram.public class MassChromatogram<gPeak extends Peak>
Implementation of a mass chromatogram, usable for LC-MS, GC-MS, or any 2 dimensional
mass spectrometry method. This class maintains a list of peaks (either Centroid
or Profile
), which make up the mass chromatogram. When a list of Centroid
is maintained the mass chromatogram is 2D, but if a list of Profile
is
maintained the mass chromatogram is 3D. A mass chromatogram is expected to display
a normal or log-normal distribution.
Nested Class Summary | |
---|---|
static interface |
MassChromatogram.MassCalculator<Type extends Peak>
In order to accommodate for a different calculation of the mass for a mass chromatogram, implement this interface. |
Nested classes/interfaces inherited from class peakml.IPeak |
---|
IPeak.AnnotationAscending, IPeak.AnnotationDescending, IPeak.MatchCompare<Type>, IPeak.RelationCompare<Type> |
Field Summary | |
---|---|
static MassChromatogram.MassCalculator<Peak> |
standard_masscalculator
Standard implementation of the mass calculator, which reduces memory requirements. |
Constructor Summary | |
---|---|
MassChromatogram(PeakData<gPeak> peakdata)
Constructs a new mass chromatogram instance out of the given set of peaks (either Centroid or Profile ). |
|
MassChromatogram(PeakData<gPeak> peakdata,
MassChromatogram.MassCalculator<gPeak> mass)
Constructs a new mass chromatogram instance out of the given set of peaks (either Centroid or Profile ). |
Method Summary | |
---|---|
double |
coda()
Simplistic implementation of the CoDA algorithm working on individual mass chromatograms. |
double |
codaDW()
Implementation of a CoDA-like approach for evalution of an individual mass chromatogram based on the Durbin-Watson statistic. |
double |
codaSW()
Implementation of a CoDA-like approach for evaluation of an individual mass chromatogram based on the Shapiro-Wilk test. |
double |
getIntensity()
Retrieves the measured intensity for this peak. |
double |
getMass()
Retrieves the mass of this peak. |
double |
getMaxIntensity()
Returns the maximum intensity of all the peaks associated with this mass chromatogram. |
double |
getMaxMass()
Returns the maximum mass of all the peaks associated with this mass chromatogram. |
double |
getMaxRetentionTime()
Returns the retention time where the mass chromatogram ends (e.g. |
int |
getMaxScanID()
Returns the maximum scan of all the peaks associated with this mass chromatogram. |
int |
getMeasurementID()
Returns an optional measurement-id for this peak. |
double |
getMinIntensity()
Returns the minimum intensity of all the peaks associated with this mass chromatogram. |
double |
getMinMass()
Returns the minimum mass of all the peaks associated with this mass chromatogram. |
double |
getMinRetentionTime()
Returns the retention time where the mass chromatogram begins (e.g. |
int |
getMinScanID()
Returns the minimum scan of all the peaks associated with this mass chromatogram. |
int |
getNrPeaks()
Returns the number of peaks associated with this mass chromatogram. |
int |
getPatternID()
Returns an optional id for the peak. |
gPeak |
getPeak(int pos)
Retrieves the peak at position pos. |
PeakData<gPeak> |
getPeakData()
Returns the PeakData instance associated to this MassChromatogram,
containing all the peak-information. |
double |
getPeakRetentionTime()
Returns the retention time where the mass chromatogram is most intense. |
java.util.Vector<gPeak> |
getPeaks()
Returns the vector filled with all the peaks associated to this mass chromatogram. |
int |
getPeakScanID()
Returns the scan where the mass chromatogram is most intense. |
double |
getRetentionTime()
Retrieves the retention time for this peak. |
int |
getScanID()
Retrieves the scan-id for this peak. |
Signal |
getSignal()
Calculates the signal for this IPeak object. |
double |
getTotalIntensity()
Returns the total intensity of the mass chromatogram. |
java.util.Iterator<gPeak> |
iterator()
|
void |
savitzkyGolay()
|
void |
savitzkyGolay(SavitzkyGolayFilter.Points p)
|
void |
setIntensity(double intensity)
Sets the intensity of this peak, for more information on mass see IPeak.getIntensity() . |
void |
setMass(double mass)
Sets the mass of this peak, for more information on mass see IPeak.getMass() . |
void |
setMeasurementID(int id)
Sets the profile-id of this peak, for more information on mass see IPeak.getMeasurementID() . |
void |
setPatternID(int id)
Sets the pattern-id of this peak, for more information on mass see IPeak.getPatternID() . |
void |
setRetentionTime(double retentiontime)
Sets the retention time for this peak, for more information on retention time see IPeak.setRetentionTime(double) . |
void |
setScanID(int scan)
Sets the scan-id for this peak, for more information on scan-id see IPeak.getScanID() . |
Methods inherited from class peakml.IPeak |
---|
findRelatedPeaks, getBestPeakOnMass, getBestPeakOnRT, match, match, peaksOfMeasurements, sha1, unpack |
Methods inherited from class peakml.Annotatable |
---|
addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotations, getAnnotation, getAnnotations, removeAllAnnotations, removeAnnotation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static MassChromatogram.MassCalculator<Peak> standard_masscalculator
Constructor Detail |
---|
public MassChromatogram(PeakData<gPeak> peakdata)
Centroid
or Profile
). The calculations of the properties
are done in MassChromatogram(PeakData, peakml.MassChromatogram.MassCalculator)
,
where the mass calculation has been implemented to calculate a weighted
mean, where the intensity is used as the weight so that peaks of
low intensity have a low impact on the mean. This makes sense as for
most mass spectrometers it's assumed that a low intensity peak has a
high deviation from the true mass.
peakdata
- The PeakData
instance containing the data of this mass chromatogram.public MassChromatogram(PeakData<gPeak> peakdata, MassChromatogram.MassCalculator<gPeak> mass)
Centroid
or Profile
). All the properties
associated to a mass chromatogram are calculated here. This means that
min and max scan, min and max intensity, and the total intensity of
the peak are calculated. The parameter mass can be used to
plug a new mass calculation MassChromatogram.MassCalculator
class, which can be suited to different needs than the standard
weighted mean.
peakdata
- The PeakData
instance containing the data of this mass chromatogram.mass
- An instance of MassChromatogram.MassCalculator
Method Detail |
---|
public double getMass()
IPeak
getMass
in class IPeak
public void setMass(double mass)
IPeak
IPeak.getMass()
. It is possible that the class implementing this interface
does not support this method.
setMass
in class IPeak
mass
- The new mass for this peak.public double getIntensity()
IPeak
getIntensity
in class IPeak
public void setIntensity(double intensity)
IPeak
IPeak.getIntensity()
. It is possible that the class implementing this interface
does not support this method.
setIntensity
in class IPeak
intensity
- The new intensity for this peak.public int getScanID()
IPeak
getScanID
in class IPeak
public void setScanID(int scan)
IPeak
IPeak.getScanID()
. It is possible that the class implementing this
interface does not support this method.
setScanID
in class IPeak
scan
- The new scan for this peak.public double getRetentionTime()
IPeak
double rt = peak.getRetentionTime(); int minutes = (int) (rt / 60); int seconds = (int) (rt % 60);
getRetentionTime
in class IPeak
public void setRetentionTime(double retentiontime)
IPeak
IPeak.setRetentionTime(double)
. It is possible that the class
implementing this interface does not support this method.
setRetentionTime
in class IPeak
retentiontime
- The new retention time for this peak.public int getMeasurementID()
IPeak
Header
.
getMeasurementID
in class IPeak
public void setMeasurementID(int id)
IPeak
IPeak.getMeasurementID()
. It is possible that the class implementing this
interface does not support this method.
setMeasurementID
in class IPeak
id
- The new profile-id for this peak.public int getPatternID()
IPeak
getPatternID
in class IPeak
public void setPatternID(int id)
IPeak
IPeak.getPatternID()
. It is possible that the class implementing this
interface does not support this method.
setPatternID
in class IPeak
id
- The new id for this peakspublic Signal getSignal()
IPeak
getSignal
in class IPeak
public java.util.Vector<gPeak> getPeaks()
getPeak(int)
makes
more sense.
public PeakData<gPeak> getPeakData()
PeakData
instance associated to this MassChromatogram,
containing all the peak-information.
public int getNrPeaks()
public gPeak getPeak(int pos)
pos
- The position of the peak to retrieve.
public double getMinMass()
public double getMaxMass()
public double getMinIntensity()
public double getMaxIntensity()
public double getTotalIntensity()
public int getMinScanID()
public int getMaxScanID()
public int getPeakScanID()
IPeak.getScanID()
method.
public double getMinRetentionTime()
public double getMaxRetentionTime()
public double getPeakRetentionTime()
public void savitzkyGolay()
public void savitzkyGolay(SavitzkyGolayFilter.Points p)
public double coda()
Signal.savitzkyGolaySmooth()
of the original signal. In
order to remove tails on both sides the smoothed version is mean
subtracted. The idea of CoDA is that noisy signals will be different
to their smoothed version (spikes are gone causing a low correlation). The
correlation value is then adjusted to fall between 0 and 1.
public double codaDW()
public double codaSW()
Statistical.shapiroWilk(double[])
is then used to evaluate whether
the signal is normally distributed.
The p-value of the test is used for the indicator and is scaled between
[0..1] (higher is better), in order to keep in line with the MCQ value
calculated by coda()
.
public java.util.Iterator<gPeak> iterator()
iterator
in interface java.lang.Iterable<gPeak extends Peak>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |