Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
SimpleExtender< PeakType, FeatureType > Class Template Reference

Simple feature extension algorithm. More...

#include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/SimpleExtender.h>

Inheritance diagram for SimpleExtender< PeakType, FeatureType >:
FeaFiModule< PeakType, FeatureType > FeatureFinderDefs DefaultParamHandler

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. More...
 
typedef Base::CoordinateType CoordinateType
 Coordinates of a point (m/z and rt) More...
 
typedef DoubleReal ProbabilityType
 Priority of a point (see below) More...
 
- Public Types inherited from FeaFiModule< PeakType, FeatureType >
typedef FeatureMap< FeatureType > FeatureMapType
 Output feature map type. More...
 
typedef MSExperiment< PeakTypeMapType
 Input map type. More...
 
typedef MapType::SpectrumType SpectrumType
 Input spectrum type. More...
 
typedef PeakType::IntensityType IntensityType
 Input intensity type. More...
 
typedef PeakType::CoordinateType CoordinateType
 Input coordinate type. More...
 
- Public Types inherited from FeatureFinderDefs
enum  Flag { UNUSED, USED }
 Flags that indicate if a peak is already used in a feature. More...
 
typedef IsotopeCluster::IndexPair IndexPair
 Index to peak consisting of two UInts (scan index / peak index) More...
 
typedef
IsotopeCluster::ChargedIndexSet 
ChargedIndexSet
 Index to peak consisting of two UInts (scan index / peak index) with charge information. More...
 
typedef IsotopeCluster::IndexSet IndexSet
 A set of peak indices. More...
 

Public Member Functions

 SimpleExtender (const MSExperiment< PeakType > *map, FeatureMap< FeatureType > *features, FeatureFinder *ff)
 Constructor. More...
 
virtual ~SimpleExtender ()
 destructor More...
 
void extend (const ChargedIndexSet &seed_region, ChargedIndexSet &result_region)
 return next seed More...
 
- Public Member Functions inherited from FeaFiModule< PeakType, FeatureType >
 FeaFiModule (const MSExperiment< PeakType > *map, FeatureMap< FeatureType > *features, FeatureFinder *ff)
 Constructor. More...
 
virtual ~FeaFiModule ()
 destructor More...
 
IntensityType getPeakIntensity (const FeatureFinderDefs::IndexPair &index) const
 Returns the intensity of a peak. More...
 
CoordinateType getPeakMz (const FeatureFinderDefs::IndexPair &index) const
 Returns the m/z of a peak. More...
 
CoordinateType getPeakRt (const FeatureFinderDefs::IndexPair &index) const
 Returns the retention time of a peak. More...
 
void getNextMz (FeatureFinderDefs::IndexPair &index) const
 fills index with the index of next peak in m/z dimension More...
 
void getPrevMz (FeatureFinderDefs::IndexPair &index) const
 fills index with the index of previous peak in m/z dimension More...
 
void getNextRt (FeatureFinderDefs::IndexPair &index)
 fills index with the index of the nearest peak in the next scan More...
 
void getPrevRt (FeatureFinderDefs::IndexPair &index)
 fills index with the index of the nearest peak in the previous scan More...
 
void addConvexHull (const FeatureFinderDefs::IndexSet &set, Feature &feature) const
 Calculates the convex hull of a index set and adds it to the feature. More...
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const String &name)
 Constructor with name that is displayed in error messages. More...
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor. More...
 
virtual ~DefaultParamHandler ()
 Destructor. More...
 
virtual DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator. More...
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator. More...
 
void setParameters (const Param &param)
 Sets the parameters. More...
 
const ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () const
 Non-mutable access to the name. More...
 
void setName (const String &name)
 Mutable access to the name. More...
 
const std::vector< String > & getSubsections () const
 Non-mutable access to the registered subsections. More...
 

Protected Member Functions

virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method. More...
 
void writeDebugFile_ (const std::vector< IndexPair > &peaks, UInt nr_feat)
 write DTA2D debug file for the feature with index nr_feat More...
 
bool isTooFarFromCentroid_ (const IndexPair &index)
 Checks if the current peak is too far from the centroid. More...
 
void moveMzUp_ (const IndexPair &index)
 Extends the seed into positive m/z direction. More...
 
void moveMzDown_ (const IndexPair &index)
 Extends the seed into negative m/z direction. More...
 
void moveRtUp_ (const IndexPair &index)
 Extension into positive rt dimension. More...
 
void moveRtDown_ (const IndexPair &index)
 Extends the seed into negative retention time direction. More...
 
ProbabilityType computePeakPriority_ (const IndexPair &index)
 Computes the priority of a peak as function of intensity and distance from seed. More...
 
void checkNeighbour_ (const IndexPair &index)
 Checks the neighbours of the current for insertion into the boundary. More...
 
- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 

Protected Attributes

Math::AveragePosition< 2 > running_avg_
 keeps an running average of the peak coordinates weighted by the intensities More...
 
std::map< IndexPair,
ProbabilityType
priorities_
 Keeps track of peaks already included in the boundary (value is priority of peak) More...
 
DPosition< 2 > last_pos_extracted_
 Position of last peak extracted from the boundary (used to compute the priority of neighbouring peaks) More...
 
std::priority_queue
< IndexWithPriority,
std::vector< IndexWithPriority >
, typename
IndexWithPriority::PriorityLess
boundary_
 Represents the boundary of a feature. More...
 
IntensityType intensity_threshold_
 Mininum intensity of a boundary point. Calculated from 'intensity_factor' and the seed intensity. More...
 
CoordinateType dist_mz_up_
 Maximum distance to seed in positive m/z. More...
 
CoordinateType dist_mz_down_
 Maximum distance to seed in negative m/z. More...
 
CoordinateType dist_rt_up_
 Maximum distance to seed in positive retention time. More...
 
CoordinateType dist_rt_down_
 Maximum distance to seed in negative retention time. More...
 
ProbabilityType priority_threshold_
 Minium priority for points in the feature region (priority is function of intensity and distance to seed) More...
 
ChargedIndexSet region_
 charged index set More...
 
- Protected Attributes inherited from FeaFiModule< PeakType, FeatureType >
const MapTypemap_
 Input data pointer. More...
 
FeatureMapTypefeatures_
 Output data pointer. More...
 
FeatureFinderff_
 Pointer to the calling FeatureFinder that is used to access the feature flags and report progress. More...
 
- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters. More...
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes! More...
 
std::vector< Stringsubsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes! More...
 
String error_name_
 Name that is displayed in error messages during the parameter checking. More...
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;. More...
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;. More...
 

Private Member Functions

 SimpleExtender ()
 Not implemented. More...
 
SimpleExtenderoperator= (const SimpleExtender &)
 Not implemented. More...
 
 SimpleExtender (const SimpleExtender &)
 Not implemented. More...
 

Detailed Description

template<class PeakType, class FeatureType>
class OpenMS::SimpleExtender< PeakType, FeatureType >

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.

SimpleExtender.png
Parameters of this class are:

NameTypeDefaultRestrictionsDescription
dist_mz_up float6 min: 0Maximum high m/z distance of peak in the region/boundary from the seed.
dist_mz_down float2 min: 0Maximum low m/z distance of peak in the region/boundary from the seed.
dist_rt_up float5 min: 0Maximum high RT distance of peak in the region/boundary from the seed.
dist_rt_down float5 min: 0Maximum 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 float0.03 min: 0 max: 1Influences 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)].

Note:

Member Typedef Documentation

typedef FeaFiModule<PeakType, FeatureType> Base

Coordinates of a point (m/z and rt)

Intensity of a data point.

Priority of a point (see below)

Constructor & Destructor Documentation

SimpleExtender ( const MSExperiment< PeakType > *  map,
FeatureMap< FeatureType > *  features,
FeatureFinder ff 
)
inline
virtual ~SimpleExtender ( )
inlinevirtual

destructor

SimpleExtender ( )
private

Not implemented.

SimpleExtender ( const SimpleExtender< PeakType, FeatureType > &  )
private

Not implemented.

Member Function Documentation

void checkNeighbour_ ( const IndexPair index)
inlineprotected
ProbabilityType computePeakPriority_ ( const IndexPair index)
inlineprotected

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
bool isTooFarFromCentroid_ ( const IndexPair index)
inlineprotected
void moveMzDown_ ( const IndexPair index)
inlineprotected
void moveMzUp_ ( const IndexPair index)
inlineprotected
void moveRtDown_ ( const IndexPair index)
inlineprotected
void moveRtUp_ ( const IndexPair index)
inlineprotected
SimpleExtender& operator= ( const SimpleExtender< PeakType, FeatureType > &  )
private

Not implemented.

virtual void updateMembers_ ( )
inlineprotectedvirtual

This method is used to update extra member variables at the end of the setParameters() method.

Also call it at the end of the derived classes' copy constructor and assignment operator.

The default implementation is empty.

Reimplemented from DefaultParamHandler.

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_.

void writeDebugFile_ ( const std::vector< IndexPair > &  peaks,
UInt  nr_feat 
)
inlineprotected

Member Data Documentation

std::priority_queue<IndexWithPriority, std::vector<IndexWithPriority>, typename IndexWithPriority::PriorityLess> boundary_
protected
CoordinateType dist_mz_down_
protected
CoordinateType dist_mz_up_
protected
CoordinateType dist_rt_down_
protected
CoordinateType dist_rt_up_
protected
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.11.1 Documentation generated on Thu Nov 14 2013 11:19:34 using doxygen 1.8.5