Simple feature extension algorithm. More...
#include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/SimpleExtender.h>
Classes | |
| struct | IndexWithPriority |
| A helper structure to sort indizes by their priority. More... | |
Public Types | |
| typedef FeaFiModule< PeakType, FeatureType > | Base |
| typedef Base::IntensityType | IntensityType |
| Intensity of a data point. | |
| typedef Base::CoordinateType | CoordinateType |
| Coordinates of a point (m/z and rt). | |
| typedef DoubleReal | ProbabilityType |
| Priority of a point (see below). | |
Public Member Functions | |
| SimpleExtender (const MSExperiment< PeakType > *map, FeatureMap< FeatureType > *features, FeatureFinder *ff) | |
| Constructor. | |
| virtual | ~SimpleExtender () |
| destructor | |
| void | extend (const ChargedIndexSet &seed_region, ChargedIndexSet &result_region) |
| return next seed | |
Protected Member Functions | |
| virtual void | updateMembers_ () |
| void | writeDebugFile_ (const std::vector< IndexPair > &peaks, UInt nr_feat) |
write DTA2D debug file for the feature with index nr_feat | |
| bool | isTooFarFromCentroid_ (const IndexPair &index) |
| Checks if the current peak is too far from the centroid. | |
| void | moveMzUp_ (const IndexPair &index) |
| Extends the seed into positive m/z direction. | |
| void | moveMzDown_ (const IndexPair &index) |
| Extends the seed into negative m/z direction. | |
| void | moveRtUp_ (const IndexPair &index) |
| Extension into positive rt dimension. | |
| void | moveRtDown_ (const IndexPair &index) |
| Extends the seed into negative retention time direction. | |
| ProbabilityType | computePeakPriority_ (const IndexPair &index) |
| Computes the priority of a peak as function of intensity and distance from seed. | |
| void | checkNeighbour_ (const IndexPair &index) |
| Checks the neighbours of the current for insertion into the boundary. | |
Protected Attributes | |
| Math::AveragePosition< 2 > | running_avg_ |
| keeps an running average of the peak coordinates weighted by the intensities | |
| std::map< IndexPair, ProbabilityType > | priorities_ |
| Keeps track of peaks already included in the boundary (value is priority of peak). | |
| DPosition< 2 > | last_pos_extracted_ |
| Position of last peak extracted from the boundary (used to compute the priority of neighbouring peaks). | |
| std::priority_queue < IndexWithPriority, std::vector< IndexWithPriority > , typename IndexWithPriority::PriorityLess > | boundary_ |
| Represents the boundary of a feature. | |
| IntensityType | intensity_threshold_ |
| Mininum intensity of a boundary point. Calculated from 'intensity_factor' and the seed intensity. | |
| CoordinateType | dist_mz_up_ |
| Maximum distance to seed in positive m/z. | |
| CoordinateType | dist_mz_down_ |
| Maximum distance to seed in negative m/z. | |
| CoordinateType | dist_rt_up_ |
| Maximum distance to seed in positive retention time. | |
| CoordinateType | dist_rt_down_ |
| Maximum distance to seed in negative retention time. | |
| ProbabilityType | priority_threshold_ |
| Minium priority for points in the feature region (priority is function of intensity and distance to seed). | |
| ChargedIndexSet | region_ |
| charged index set | |
Private Member Functions | |
| SimpleExtender () | |
| Not implemented. | |
| SimpleExtender & | operator= (const SimpleExtender &) |
| Not implemented. | |
| SimpleExtender (const SimpleExtender &) | |
| Not implemented. | |
Simple feature extension algorithm.
This algorithm implements the extension phase of the FeatureFinder as described by Groepl et al. (2005)
We want to determine a region around a seed that is provided by the seeder. Initially, this region is empty. The boundary of this region is implemented using a MutablePriorityQueue which contains only the seed at the beginning.
At each step, we choose a data point from the boundary, move it into the region and explore the neigbourhood of this point in a cross-wise manner (m/z up, m/z down, rt up and rt down). During this exploration we compute the priority of all encountered points as a function of the distance from the extracted point. If this priority exceeds a threshold, we insert the corresponding point into the boundary and proceed.
We stop the extension phase if all peaks contained in the boundary have an intensity lower than a threshold or are too distant from the centroid of the feature.
| Name | Type | Default | Restrictions | Description |
|---|---|---|---|---|
| dist_mz_up | float | 6 | min: 0 | Maximum high m/z distance of peak in the region/boundary from the seed. |
| dist_mz_down | float | 2 | min: 0 | Maximum low m/z distance of peak in the region/boundary from the seed. |
| dist_rt_up | float | 5 | min: 0 | Maximum high RT distance of peak in the region/boundary from the seed. |
| dist_rt_down | float | 5 | min: 0 | Maximum low RT distance of peak in the region/boundary from the seed. |
| priority_thr | float | -0.1 | Minimum priority for data points to be included into the boundary of the feature (default 0.0). The priority of a data point is a function of its intensity and its distance to the last point included into the feature region. Setting this threshold to zero or a very small value is usually a good idea. | |
| intensity_factor | float | 0.03 | min: 0 max: 1 | Influences for intensity (ion count) threshold in the feature extension. We include only raw data points into this region if their intensity is larger than [intensity_factor * (intensity of the seed)]. |
| typedef FeaFiModule<PeakType, FeatureType> Base |
| typedef Base::CoordinateType CoordinateType |
Coordinates of a point (m/z and rt).
| typedef Base::IntensityType IntensityType |
Intensity of a data point.
| typedef DoubleReal ProbabilityType |
Priority of a point (see below).
| SimpleExtender | ( | const MSExperiment< PeakType > * | map, | |
| FeatureMap< FeatureType > * | features, | |||
| FeatureFinder * | ff | |||
| ) | [inline] |
| virtual ~SimpleExtender | ( | ) | [inline, virtual] |
destructor
| SimpleExtender | ( | ) | [private] |
Not implemented.
| SimpleExtender | ( | const SimpleExtender< PeakType, FeatureType > & | ) | [private] |
Not implemented.
| void checkNeighbour_ | ( | const IndexPair & | index | ) | [inline, protected] |
Checks the neighbours of the current for insertion into the boundary.
References SimpleExtender< PeakType, FeatureType >::boundary_, SimpleExtender< PeakType, FeatureType >::computePeakPriority_(), FeaFiModule< PeakType, FeatureType >::ff_, FeatureFinder::getPeakFlag(), FeaFiModule< PeakType, FeatureType >::getPeakIntensity(), SimpleExtender< PeakType, FeatureType >::intensity_threshold_, OPENMS_PRECONDITION, SimpleExtender< PeakType, FeatureType >::priorities_, and SimpleExtender< PeakType, FeatureType >::priority_threshold_.
Referenced by SimpleExtender< PeakType, FeatureType >::moveMzDown_(), SimpleExtender< PeakType, FeatureType >::moveMzUp_(), SimpleExtender< PeakType, FeatureType >::moveRtDown_(), and SimpleExtender< PeakType, FeatureType >::moveRtUp_().
| ProbabilityType computePeakPriority_ | ( | const IndexPair & | index | ) | [inline, protected] |
Computes the priority of a peak as function of intensity and distance from seed.
References FeaFiModule< PeakType, FeatureType >::map_.
Referenced by SimpleExtender< PeakType, FeatureType >::checkNeighbour_(), and SimpleExtender< PeakType, FeatureType >::extend().
| void extend | ( | const ChargedIndexSet & | seed_region, | |
| ChargedIndexSet & | result_region | |||
| ) | [inline] |
return next seed
References AveragePosition< D >::add(), SimpleExtender< PeakType, FeatureType >::boundary_, IsotopeCluster::ChargedIndexSet::charge, AveragePosition< D >::clear(), SimpleExtender< PeakType, FeatureType >::computePeakPriority_(), FeaFiModule< PeakType, FeatureType >::ff_, FeatureFinder::getPeakFlag(), FeaFiModule< PeakType, FeatureType >::getPeakIntensity(), FeaFiModule< PeakType, FeatureType >::getPeakMz(), FeaFiModule< PeakType, FeatureType >::getPeakRt(), SimpleExtender< PeakType, FeatureType >::intensity_threshold_, SimpleExtender< PeakType, FeatureType >::last_pos_extracted_, SimpleExtender< PeakType, FeatureType >::moveMzDown_(), SimpleExtender< PeakType, FeatureType >::moveMzUp_(), SimpleExtender< PeakType, FeatureType >::moveRtDown_(), SimpleExtender< PeakType, FeatureType >::moveRtUp_(), OPENMS_PRECONDITION, DefaultParamHandler::param_, SimpleExtender< PeakType, FeatureType >::priorities_, SimpleExtender< PeakType, FeatureType >::running_avg_, and SimpleExtender< PeakType, FeatureType >::writeDebugFile_().
Referenced by FeatureFinderAlgorithmSimplest< PeakType, FeatureType >::run(), and FeatureFinderAlgorithmSimple< PeakType, FeatureType >::run().
| bool isTooFarFromCentroid_ | ( | const IndexPair & | index | ) | [inline, protected] |
Checks if the current peak is too far from the centroid.
References SimpleExtender< PeakType, FeatureType >::dist_mz_down_, SimpleExtender< PeakType, FeatureType >::dist_mz_up_, SimpleExtender< PeakType, FeatureType >::dist_rt_down_, SimpleExtender< PeakType, FeatureType >::dist_rt_up_, FeaFiModule< PeakType, FeatureType >::getPeakMz(), FeaFiModule< PeakType, FeatureType >::getPeakRt(), AveragePosition< D >::getPosition(), Peak2D::MZ, OPENMS_PRECONDITION, Peak2D::RT, and SimpleExtender< PeakType, FeatureType >::running_avg_.
Referenced by SimpleExtender< PeakType, FeatureType >::moveMzDown_(), SimpleExtender< PeakType, FeatureType >::moveMzUp_(), SimpleExtender< PeakType, FeatureType >::moveRtDown_(), and SimpleExtender< PeakType, FeatureType >::moveRtUp_().
| void moveMzDown_ | ( | const IndexPair & | index | ) | [inline, protected] |
Extends the seed into negative m/z direction.
References SimpleExtender< PeakType, FeatureType >::checkNeighbour_(), FeaFiModule< PeakType, FeatureType >::getPrevMz(), and SimpleExtender< PeakType, FeatureType >::isTooFarFromCentroid_().
Referenced by SimpleExtender< PeakType, FeatureType >::extend().
| void moveMzUp_ | ( | const IndexPair & | index | ) | [inline, protected] |
Extends the seed into positive m/z direction.
References SimpleExtender< PeakType, FeatureType >::checkNeighbour_(), FeaFiModule< PeakType, FeatureType >::getNextMz(), and SimpleExtender< PeakType, FeatureType >::isTooFarFromCentroid_().
Referenced by SimpleExtender< PeakType, FeatureType >::extend().
| void moveRtDown_ | ( | const IndexPair & | index | ) | [inline, protected] |
Extends the seed into negative retention time direction.
References SimpleExtender< PeakType, FeatureType >::checkNeighbour_(), FeaFiModule< PeakType, FeatureType >::getPrevRt(), and SimpleExtender< PeakType, FeatureType >::isTooFarFromCentroid_().
Referenced by SimpleExtender< PeakType, FeatureType >::extend().
| void moveRtUp_ | ( | const IndexPair & | index | ) | [inline, protected] |
Extension into positive rt dimension.
References SimpleExtender< PeakType, FeatureType >::checkNeighbour_(), FeaFiModule< PeakType, FeatureType >::getNextRt(), and SimpleExtender< PeakType, FeatureType >::isTooFarFromCentroid_().
Referenced by SimpleExtender< PeakType, FeatureType >::extend().
| SimpleExtender& operator= | ( | const SimpleExtender< PeakType, FeatureType > & | ) | [private] |
Not implemented.
| virtual void updateMembers_ | ( | ) | [inline, protected, virtual] |
References SimpleExtender< PeakType, FeatureType >::dist_mz_down_, SimpleExtender< PeakType, FeatureType >::dist_mz_up_, SimpleExtender< PeakType, FeatureType >::dist_rt_down_, SimpleExtender< PeakType, FeatureType >::dist_rt_up_, Param::getValue(), DefaultParamHandler::param_, and SimpleExtender< PeakType, FeatureType >::priority_threshold_.
write DTA2D debug file for the feature with index nr_feat
References FeaFiModule< PeakType, FeatureType >::getPeakMz(), and FeaFiModule< PeakType, FeatureType >::getPeakRt().
Referenced by SimpleExtender< PeakType, FeatureType >::extend().
std::priority_queue<IndexWithPriority, std::vector<IndexWithPriority>, typename IndexWithPriority::PriorityLess> boundary_ [protected] |
Represents the boundary of a feature.
Referenced by SimpleExtender< PeakType, FeatureType >::checkNeighbour_(), and SimpleExtender< PeakType, FeatureType >::extend().
CoordinateType dist_mz_down_ [protected] |
Maximum distance to seed in negative m/z.
Referenced by SimpleExtender< PeakType, FeatureType >::isTooFarFromCentroid_(), and SimpleExtender< PeakType, FeatureType >::updateMembers_().
CoordinateType dist_mz_up_ [protected] |
Maximum distance to seed in positive m/z.
Referenced by SimpleExtender< PeakType, FeatureType >::isTooFarFromCentroid_(), and SimpleExtender< PeakType, FeatureType >::updateMembers_().
CoordinateType dist_rt_down_ [protected] |
Maximum distance to seed in negative retention time.
Referenced by SimpleExtender< PeakType, FeatureType >::isTooFarFromCentroid_(), and SimpleExtender< PeakType, FeatureType >::updateMembers_().
CoordinateType dist_rt_up_ [protected] |
Maximum distance to seed in positive retention time.
Referenced by SimpleExtender< PeakType, FeatureType >::isTooFarFromCentroid_(), and SimpleExtender< PeakType, FeatureType >::updateMembers_().
IntensityType intensity_threshold_ [protected] |
Mininum intensity of a boundary point. Calculated from 'intensity_factor' and the seed intensity.
Referenced by SimpleExtender< PeakType, FeatureType >::checkNeighbour_(), and SimpleExtender< PeakType, FeatureType >::extend().
DPosition<2> last_pos_extracted_ [protected] |
Position of last peak extracted from the boundary (used to compute the priority of neighbouring peaks).
Referenced by SimpleExtender< PeakType, FeatureType >::extend().
std::map<IndexPair, ProbabilityType> priorities_ [protected] |
Keeps track of peaks already included in the boundary (value is priority of peak).
Referenced by SimpleExtender< PeakType, FeatureType >::checkNeighbour_(), and SimpleExtender< PeakType, FeatureType >::extend().
ProbabilityType priority_threshold_ [protected] |
Minium priority for points in the feature region (priority is function of intensity and distance to seed).
Referenced by SimpleExtender< PeakType, FeatureType >::checkNeighbour_(), and SimpleExtender< PeakType, FeatureType >::updateMembers_().
ChargedIndexSet region_ [protected] |
charged index set
Math::AveragePosition<2> running_avg_ [protected] |
keeps an running average of the peak coordinates weighted by the intensities
Referenced by SimpleExtender< PeakType, FeatureType >::extend(), and SimpleExtender< PeakType, FeatureType >::isTooFarFromCentroid_().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:57 using doxygen 1.7.1 |