Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Protected Attributes

Feature Class Reference
[Kernel]

An LC-MS feature. More...

#include <OpenMS/KERNEL/Feature.h>

Inheritance diagram for Feature:
BaseFeature RichPeak2D Peak2D MetaInfoInterface UniqueIdInterface MRMFeature

List of all members.

Public Member Functions

Featureoperator= (const Feature &rhs)
 Assignment operator.
bool operator== (const Feature &rhs) const
 Equality operator.
const std::vector< Feature > & getSubordinates () const
 immutable access to subordinate features
std::vector< Feature > & getSubordinates ()
 mutable access to subordinate features
void setSubordinates (const std::vector< Feature > &rhs)
 mutable access to subordinate features
template<typename Type >
Size applyMemberFunction (Size(Type::*member_function)())
 Applies a member function of Type to the feature (including subordinates). The returned values are accumulated.
template<typename Type >
Size applyMemberFunction (Size(Type::*member_function)() const) const
 The "const" variant.
Constructors and Destructor

 Feature ()
 Default constructor.
 Feature (const Feature &feature)
 Copy constructor.
 ~Feature ()
 Destructor.
Convex hulls and bounding box

const std::vector< ConvexHull2D > & getConvexHulls () const
 Non-mutable access to the convex hulls.
std::vector< ConvexHull2D > & getConvexHulls ()
 Mutable access to the convex hulls of single mass traces.
void setConvexHulls (const std::vector< ConvexHull2D > &hulls)
 Set the convex hulls of single mass traces.
ConvexHull2DgetConvexHull () const
 Returns the overall convex hull of the feature (calculated from the convex hulls of the mass traces).
bool encloses (DoubleReal rt, DoubleReal mz) const
 Returns if the mass trace convex hulls of the feature enclose the position specified by rt and mz.

Protected Attributes

QualityType qualities_ [2]
 Quality measures for each dimension.
ModelDescription< 2 > model_desc_
 Description of the theoretical model the feature was constructed with.
std::vector< ConvexHull2Dconvex_hulls_
 Array of convex hulls (one for each mass trace).
bool convex_hulls_modified_
 Flag that indicates if the overall convex hull needs to be recomputed (i.e. mass trace convex hulls were modified).
ConvexHull2D convex_hull_
 Overall convex hull of the feature.
std::vector< Featuresubordinates_
 subordinate features (e.g. features that the ModelFitter discarded due to inferior quality)

Model and quality methods



typedef QualityLess OverallQualityLess
 Compare by quality.
QualityType getOverallQuality () const
 Non-mutable access to the overall quality.
void setOverallQuality (QualityType q)
 Set the overall quality.
QualityType getQuality (Size index) const
 Non-mutable access to the quality in dimension c.
void setQuality (Size index, QualityType q)
 Set the quality in dimension c.
const ModelDescription< 2 > & getModelDescription () const
 Non-mutable access to the model description.
ModelDescription< 2 > & getModelDescription ()
 Mutable access to the model description.
void setModelDescription (const ModelDescription< 2 > &q)
 Set the model description.

Detailed Description

An LC-MS feature.

The Feature class is used to describe the two-dimensional signal caused by a peptide. It can store a charge state and a list of peptide identifications. The area occupied by the Feature in the LC-MS data set is represented by a list of convex hulls (one for each isotopic peak). There is also a convex hull for the entire Feature. The model description can store the parameters of a two-dimensional theoretical model of the underlying signal in LC-MS. Currently, non-peptidic compounds are also represented as features.

By convention in OpenMS, the position of a feature is defined as maximum position of the model for the retention time dimension and the mass of the monoisotopic peak for the m/z dimension. The intensity of a feature is (proportional to) its total ion count.

Feature is derived from RichPeak2D. Also inherited is a MetaInfoInterface. Features as usually are contained in a FeatureMap. See also FeatureHandle and ConsensusFeature.


Member Typedef Documentation

Compare by quality.


Constructor & Destructor Documentation

Feature (  ) 

Default constructor.

Feature ( const Feature feature  ) 

Copy constructor.

~Feature (  ) 

Destructor.


Member Function Documentation

Size applyMemberFunction ( Size(Type::*)()  member_function  )  [inline]

Applies a member function of Type to the feature (including subordinates). The returned values are accumulated.

Example: The following will print the number of features (parent feature and subordinates) with invalid unique ids:

      Feature f;
      (...)
      std::cout << f.applyMemberFunction(&UniqueIdInterface::hasInvalidUniqueId) << std::endl;

See e.g. UniqueIdInterface for what else can be done this way.

Size applyMemberFunction ( Size(Type::*)() const   member_function  )  const [inline]

The "const" variant.

bool encloses ( DoubleReal  rt,
DoubleReal  mz 
) const

Returns if the mass trace convex hulls of the feature enclose the position specified by rt and mz.

Referenced by ModelFitter< PeakType, FeatureType >::fit(), and FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run().

ConvexHull2D& getConvexHull (  )  const

Returns the overall convex hull of the feature (calculated from the convex hulls of the mass traces).

Note:
the bounding box of the feature can be accessed through the returned convex hull

Referenced by ModelFitter< PeakType, FeatureType >::fit(), and FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run().

std::vector<ConvexHull2D>& getConvexHulls (  ) 

Mutable access to the convex hulls of single mass traces.

ModelDescription<2>& getModelDescription (  ) 

Mutable access to the model description.

QualityType getQuality ( Size  index  )  const

Non-mutable access to the quality in dimension c.

Referenced by ModelFitter< PeakType, FeatureType >::fit().

std::vector<Feature>& getSubordinates (  ) 

mutable access to subordinate features

const std::vector<Feature>& getSubordinates (  )  const
Feature& operator= ( const Feature rhs  ) 

Assignment operator.

bool operator== ( const Feature rhs  )  const

Equality operator.

void setConvexHulls ( const std::vector< ConvexHull2D > &  hulls  ) 

Set the convex hulls of single mass traces.

Referenced by KroenikFile::load(), and IsotopeWaveletTransform< PeakType >::mapSeeds2Features().

void setModelDescription ( const ModelDescription< 2 > &  q  ) 
void setSubordinates ( const std::vector< Feature > &  rhs  ) 

mutable access to subordinate features


Member Data Documentation

ConvexHull2D convex_hull_ [mutable, protected]

Overall convex hull of the feature.

std::vector<ConvexHull2D> convex_hulls_ [protected]

Array of convex hulls (one for each mass trace).

bool convex_hulls_modified_ [mutable, protected]

Flag that indicates if the overall convex hull needs to be recomputed (i.e. mass trace convex hulls were modified).

ModelDescription<2> model_desc_ [protected]

Description of the theoretical model the feature was constructed with.

QualityType qualities_[2] [protected]

Quality measures for each dimension.

std::vector<Feature> subordinates_ [protected]

subordinate features (e.g. features that the ModelFitter discarded due to inferior quality)


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:54 using doxygen 1.7.1