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

SimplePairFinder Class Reference
[FeatureGrouping]

This class implements a simple point pair finding algorithm. More...

#include <OpenMS/ANALYSIS/MAPMATCHING/SimplePairFinder.h>

Inheritance diagram for SimplePairFinder:
BaseGroupFinder DefaultParamHandler ProgressLogger

List of all members.

Public Types

typedef BaseGroupFinder Base
 Base class.

Public Member Functions

 SimplePairFinder ()
 Constructor.
virtual ~SimplePairFinder ()
 Destructor.
virtual void run (const std::vector< ConsensusMap > &input_maps, ConsensusMap &result_map)
 Run the algorithm.

Static Public Member Functions

static BaseGroupFindercreate ()
 returns an instance of this class
static const String getProductName ()
 returns the name of this module

Protected Member Functions

virtual void updateMembers_ ()
DoubleReal similarity_ (ConsensusFeature const &left, ConsensusFeature const &right) const
 Compute the similarity for a pair of elements.

Protected Attributes

DoubleReal diff_exponent_ [2]
 A parameter for similarity_().
DoubleReal diff_intercept_ [2]
 A parameter for similarity_().
DoubleReal pair_min_quality_
 Minimal pair quality.

Detailed Description

This class implements a simple point pair finding algorithm.

It offers a method to find element pairs across two element maps.

The similarity value should express our confidence that one element might possibly be matched to the other. Larger quality values are better, the maximal similarity is one. Let $\Delta_\textit{RT}$ and $\Delta_\textit{MZ}$ be the absolute values of the RT and MZ differences in the data. Then the similarity value is

\[ \frac{1}{ \big( 1 + \Delta_\textit{RT} \cdot \textit{diff\_intercept\_RT} \big)^\textit{diff\_exponent\_RT} \cdot \big( 1 + \Delta_\textit{MZ} \cdot \textit{diff\_intercept\_MZ} \big)^\textit{diff\_exponent\_MZ} } \]

Choosing diff_exponent: This parameter controls the growth rate of the penalty for differences. It is for example possible to search for pairs using the absolute distance in RT (which should not be very susceptible to outliers) and the squared distance in MZ (where small difference occur frequently, but large differences indicate a mismatch).

Choosing diff_intercept: Since we are taking the reciprocal value ("1/..."), we include an offset to avoid division by zero in case $\Delta=0$. To set this parameter, ask yourself: How much worse is a difference of 1 compared to no difference?

The following image illustrates the influence of these parameters:

SimplePairFinder.png

Influence of the parameters intercept and exponent

Parameters of this class are:

NameTypeDefaultRestrictionsDescription
similarity:pair_min_quality float0.01  Minimum required pair quality.
similarity:diff_intercept:RT float1  This parameter controls the asymptotic decay rate for large differences (for more details see the similarity measurement).
similarity:diff_intercept:MZ float0.1  This parameter controls the asymptotic decay rate for large differences (for more details see the similarity measurement).
similarity:diff_exponent:RT float2  This parameter is important for small differences (for more details see the similarity measurement).
similarity:diff_exponent:MZ float1  This parameter is important for small differences (for more details see the similarity measurement).

Note:

Member Typedef Documentation

Base class.


Constructor & Destructor Documentation

Constructor.

virtual ~SimplePairFinder (  )  [inline, virtual]

Destructor.


Member Function Documentation

static BaseGroupFinder* create (  )  [inline, static]

returns an instance of this class

static const String getProductName (  )  [inline, static]

returns the name of this module

virtual void run ( const std::vector< ConsensusMap > &  input_maps,
ConsensusMap result_map 
) [virtual]

Run the algorithm.

Note:
Exactly two input maps must be provided.
All two input maps must be provided.
Exceptions:
Exception::IllegalArgument is thrown if the input data is not valid.

Implements BaseGroupFinder.

DoubleReal similarity_ ( ConsensusFeature const &  left,
ConsensusFeature const &  right 
) const [protected]

Compute the similarity for a pair of elements.

virtual void updateMembers_ (  )  [protected, virtual]

Member Data Documentation

DoubleReal diff_exponent_[2] [protected]

A parameter for similarity_().

DoubleReal diff_intercept_[2] [protected]

A parameter for similarity_().

Minimal pair quality.


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