|  | OpenMS
    2.6.0
    | 
A container type that gathers peaks similar in m/z and moving along retention time. More...
#include <OpenMS/KERNEL/MassTrace.h>
| Public Types | |
| enum | MT_QUANTMETHOD { MT_QUANT_AREA = 0, MT_QUANT_MEDIAN, MT_QUANT_HEIGHT, SIZE_OF_MT_QUANTMETHOD } | 
| Public Member Functions | |
| Constructors and Destructor | |
| MassTrace () | |
| Default constructor.  More... | |
| MassTrace (const std::list< PeakType > &trace_peaks) | |
| MassTrace (const std::vector< PeakType > &trace_peaks) | |
| Detailed constructor for vector.  More... | |
| ~MassTrace () | |
| Destructor.  More... | |
| MassTrace (const MassTrace &) | |
| Copy constructor.  More... | |
| MassTrace & | operator= (const MassTrace &) | 
| Assignment operator.  More... | |
| PeakType & | operator[] (const Size &mt_idx) | 
| Random access operator.  More... | |
| const PeakType & | operator[] (const Size &mt_idx) const | 
| Accessor methods | |
| Size | getSize () const | 
| Returns the number of peaks contained in the mass trace.  More... | |
| String | getLabel () const | 
| Gets label of mass trace.  More... | |
| void | setLabel (const String &label) | 
| Sets label of mass trace.  More... | |
| double | getCentroidMZ () const | 
| Returns the centroid m/z.  More... | |
| double | getCentroidRT () const | 
| Returns the centroid RT.  More... | |
| double | getCentroidSD () const | 
| void | setCentroidSD (const double &tmp_sd) | 
| double | getFWHM () const | 
| double | getTraceLength () const | 
| Returns the length of the trace (as difference in RT)  More... | |
| std::pair< Size, Size > | getFWHMborders () const | 
| const std::vector< double > & | getSmoothedIntensities () const | 
| Gets smoothed intensities (empty if no smoothing was explicitly done beforehand!).  More... | |
| void | setSmoothedIntensities (const std::vector< double > &db_vec) | 
| Set smoothed intensities (smoothing is done externally, e.g. by LowessSmoothing).  More... | |
| double | getAverageMS1CycleTime () const | 
| Get average scan time of mass trace.  More... | |
| Computational methods | |
| double | computeSmoothedPeakArea () const | 
| Sum all non-negative (smoothed!) intensities in the mass trace.  More... | |
| double | computePeakArea () const | 
| Sum intensities of all peaks in the mass trace.  More... | |
| Size | findMaxByIntPeak (bool use_smoothed_ints=false) const | 
| Return the index of the mass trace's highest peak within the MassTrace container (based either on raw or smoothed intensities).  More... | |
| double | estimateFWHM (bool use_smoothed_ints=false) | 
| void | setQuantMethod (MT_QUANTMETHOD method) | 
| determine if area or median is used for quantification  More... | |
| MT_QUANTMETHOD | getQuantMethod () const | 
| check if area or median is used for quantification  More... | |
| double | computeFwhmAreaSmooth () const | 
| Compute chromatographic peak area within the FWHM range.  More... | |
| double | computeFwhmArea () const | 
| double | getIntensity (bool smoothed) const | 
| double | getMaxIntensity (bool smoothed) const | 
| ConvexHull2D | getConvexhull () const | 
| Return the mass trace's convex hull.  More... | |
| Update methods for centroid RT and m/z | |
| void | updateSmoothedMaxRT () | 
| void | updateWeightedMeanRT () | 
| Compute & update centroid RT as a intensity-weighted mean of RTs.  More... | |
| void | updateSmoothedWeightedMeanRT () | 
| void | updateMedianRT () | 
| Compute & update centroid RT as median position of intensities.  More... | |
| void | updateMedianMZ () | 
| Compute & update centroid m/z as median of m/z values.  More... | |
| void | updateMeanMZ () | 
| Compute & update centroid m/z as mean of m/z values.  More... | |
| void | updateWeightedMeanMZ () | 
| Compute & update centroid m/z as weighted mean of m/z values.  More... | |
| void | updateWeightedMZsd () | 
| Compute & update m/z standard deviation of mass trace as weighted mean of m/z values.  More... | |
| Static Public Member Functions | |
| static MT_QUANTMETHOD | getQuantMethod (const String &val) | 
| converts a string to enum value; returns 'SIZE_OF_MT_QUANTMETHOD' upon error  More... | |
| Public Attributes | |
| double | fwhm_mz_avg | 
| Average FWHM of m/z peaks.  More... | |
| Static Public Attributes | |
| static const std::string | names_of_quantmethod [SIZE_OF_MT_QUANTMETHOD] | 
| Private Member Functions | |
| double | computeMedianIntensity_ () const | 
| median of trace intensities  More... | |
| double | linearInterpolationAtY_ (double xA, double xB, double yA, double yB, double y_eval) const | 
| Private Attributes | |
| std::vector< PeakType > | trace_peaks_ | 
| Actual MassTrace container for doing centroid calculation, peak width estimation etc.  More... | |
| double | centroid_mz_ | 
| Centroid m/z.  More... | |
| double | centroid_sd_ | 
| intensity-weighted STD  More... | |
| double | centroid_rt_ | 
| Centroid RT.  More... | |
| String | label_ | 
| Trace label.  More... | |
| std::vector< double > | smoothed_intensities_ | 
| Container for smoothed intensities. Smoothing must be done externally.  More... | |
| double | fwhm_ | 
| FWHM of RT peak.  More... | |
| Size | fwhm_start_idx_ | 
| index into 'trace_peaks_' vector (inclusive)  More... | |
| Size | fwhm_end_idx_ | 
| index into 'trace_peaks_' vector (inclusive)  More... | |
| MT_QUANTMETHOD | quant_method_ | 
| use area under mass trace or the median of intensities  More... | |
| Iterators | |
| typedef std::vector< PeakType >::iterator | iterator | 
| typedef std::vector< PeakType >::const_iterator | const_iterator | 
| typedef std::vector< PeakType >::reverse_iterator | reverse_iterator | 
| typedef std::vector< PeakType >::const_reverse_iterator | const_reverse_iterator | 
| iterator | begin () | 
| iterator | end () | 
| const_iterator | begin () const | 
| const_iterator | end () const | 
| reverse_iterator | rbegin () | 
| reverse_iterator | rend () | 
| const_reverse_iterator | rbegin () const | 
| const_reverse_iterator | rend () const | 
A container type that gathers peaks similar in m/z and moving along retention time.
Depending on the method of extraction a mass trace could virtually represent a complete extracted ion chromatogram (XIC) or merely a part of it (e.g., a chromatographic peak). The kernel class provides methods for computing mass trace characteristics such as its centroid m/z and retention time. Coeluting mass traces can be further assembled to complete isotope patterns of peptides/metabolites.
| typedef std::vector<PeakType>::const_iterator const_iterator | 
| typedef std::vector<PeakType>::const_reverse_iterator const_reverse_iterator | 
| typedef std::vector<PeakType>::reverse_iterator reverse_iterator | 
| enum MT_QUANTMETHOD | 
| MassTrace | ( | ) | 
Default constructor.
Detailed constructor (useful, since Mass Traces are commonly assembled by prepending and appending – which is faster using lists)
| ~MassTrace | ( | ) | 
Destructor.
| 
 | inline | 
| 
 | inline | 
| double computeFwhmArea | ( | ) | const | 
| 
 | private | 
median of trace intensities
| double computePeakArea | ( | ) | const | 
Sum intensities of all peaks in the mass trace.
| double computeSmoothedPeakArea | ( | ) | const | 
Sum all non-negative (smoothed!) intensities in the mass trace.
| 
 | inline | 
| 
 | inline | 
| double estimateFWHM | ( | bool | use_smoothed_ints = false | ) | 
| Size findMaxByIntPeak | ( | bool | use_smoothed_ints = false | ) | const | 
Return the index of the mass trace's highest peak within the MassTrace container (based either on raw or smoothed intensities).
| 
 | inline | 
Get average scan time of mass trace.
| 
 | inline | 
Returns the centroid m/z.
Referenced by CmpMassTraceByMZ::operator()().
| 
 | inline | 
Returns the centroid RT.
| 
 | inline | 
| ConvexHull2D getConvexhull | ( | ) | const | 
Return the mass trace's convex hull.
| 
 | inline | 
| double getIntensity | ( | bool | smoothed | ) | const | 
| 
 | inline | 
Gets label of mass trace.
| double getMaxIntensity | ( | bool | smoothed | ) | const | 
| MT_QUANTMETHOD getQuantMethod | ( | ) | const | 
check if area or median is used for quantification
| 
 | static | 
converts a string to enum value; returns 'SIZE_OF_MT_QUANTMETHOD' upon error
| 
 | inline | 
Returns the number of peaks contained in the mass trace.
| 
 | inline | 
Gets smoothed intensities (empty if no smoothing was explicitly done beforehand!).
| 
 | inline | 
Returns the length of the trace (as difference in RT)
| 
 | private | 
calculate x coordinate of start/end indexes at half_max calculation is based on (yB - yA) / (xB - xA) = (y_eval - yA) / (xC - xA) solve for xC: xC = xA + ((y_eval - yA) * (xB - xA) / (yB - yA))
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
Sets label of mass trace.
| void setQuantMethod | ( | MT_QUANTMETHOD | method | ) | 
determine if area or median is used for quantification
| 
 | inline | 
Set smoothed intensities (smoothing is done externally, e.g. by LowessSmoothing).
| void updateMeanMZ | ( | ) | 
Compute & update centroid m/z as mean of m/z values.
| void updateMedianMZ | ( | ) | 
Compute & update centroid m/z as median of m/z values.
| void updateMedianRT | ( | ) | 
Compute & update centroid RT as median position of intensities.
| void updateSmoothedMaxRT | ( | ) | 
| void updateSmoothedWeightedMeanRT | ( | ) | 
| void updateWeightedMeanMZ | ( | ) | 
Compute & update centroid m/z as weighted mean of m/z values.
| void updateWeightedMeanRT | ( | ) | 
Compute & update centroid RT as a intensity-weighted mean of RTs.
| void updateWeightedMZsd | ( | ) | 
Compute & update m/z standard deviation of mass trace as weighted mean of m/z values.
Make sure to call update(Weighted)(Mean|Median)MZ() first! 
 use getCentroidSD() to get result 
| 
 | private | 
Centroid m/z.
| 
 | private | 
Centroid RT.
| 
 | private | 
intensity-weighted STD
| 
 | private | 
index into 'trace_peaks_' vector (inclusive)
| 
 | private | 
index into 'trace_peaks_' vector (inclusive)
| 
 | private | 
Trace label.
| 
 | static | 
| 
 | private | 
use area under mass trace or the median of intensities
| 
 | private | 
Container for smoothed intensities. Smoothing must be done externally.
 1.8.16
 1.8.16