A container type that gathers peaks similar in m/z and moving along retention time. More...
#include <OpenMS/KERNEL/MassTrace.h>
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 |
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 | disableFHWM () |
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... | |
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 |
Update methods for centroid RT and m/z | |
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_ |
Size | fwhm_start_idx_ |
Size | fwhm_end_idx_ |
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 () |
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 |
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 |
double computeFwhmAreaSmooth | ( | ) | const |
Compute chromatographic peak area within the FWHM range.
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.
void disableFHWM | ( | ) |
Instead of estimating a FWHM and LC peak borders, use the whole mass trace, i.e. set borders to the margins of the array. Useful for direct injection data.
|
inline |
|
inline |
Estimate FWHM of chromatographic peak in seconds (based on either raw or smoothed intensities). stores result internally, use getFWHM().
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 |
|
inline |
Gets label of mass trace.
|
inline |
Returns the number of peaks contained in the mass trace.
|
inline |
Gets smoothed intensities (empty if no smoothing was explicitly done beforehand!).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets label of mass trace.
|
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 |
|
private |
|
private |
|
private |
Trace label.
|
private |
Container for smoothed intensities. Smoothing must be done externally.
OpenMS / TOPP release 2.0.0 | Documentation generated on Sat May 16 2015 16:13:56 using doxygen 1.8.9.1 |