OpenMS
|
This class implements a simple point pair finding algorithm. More...
#include <OpenMS/ANALYSIS/MAPMATCHING/SimplePairFinder.h>
Public Types | |
typedef BaseGroupFinder | Base |
Base class. More... | |
Public Types inherited from ProgressLogger | |
enum | LogType { CMD , GUI , NONE } |
Possible log types. More... | |
Public Member Functions | |
SimplePairFinder () | |
Constructor. More... | |
~SimplePairFinder () override | |
Destructor. More... | |
void | run (const std::vector< ConsensusMap > &input_maps, ConsensusMap &result_map) override |
Run the algorithm. More... | |
Public Member Functions inherited from BaseGroupFinder | |
BaseGroupFinder () | |
Default constructor. More... | |
~BaseGroupFinder () override | |
Destructor. 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... | |
DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () 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... | |
Public Member Functions inherited from ProgressLogger | |
ProgressLogger () | |
Constructor. More... | |
virtual | ~ProgressLogger () |
Destructor. More... | |
ProgressLogger (const ProgressLogger &other) | |
Copy constructor. More... | |
ProgressLogger & | operator= (const ProgressLogger &other) |
Assignment Operator. More... | |
void | setLogType (LogType type) const |
Sets the progress log that should be used. The default type is NONE! More... | |
LogType | getLogType () const |
Returns the type of progress log being used. More... | |
void | startProgress (SignedSize begin, SignedSize end, const String &label) const |
Initializes the progress display. More... | |
void | setProgress (SignedSize value) const |
Sets the current progress. More... | |
void | endProgress () const |
Ends the progress display. More... | |
void | nextProgress () const |
increment progress by 1 (according to range begin-end) More... | |
Static Public Member Functions | |
static BaseGroupFinder * | create () |
returns an instance of this class More... | |
static const String | getProductName () |
returns the name of this module More... | |
Static Public Member Functions inherited from BaseGroupFinder | |
static void | registerChildren () |
Register all derived classes here. More... | |
Static Public Member Functions inherited from DefaultParamHandler | |
static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="") |
Writes all parameters to meta values. More... | |
Protected Member Functions | |
void | updateMembers_ () override |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
double | similarity_ (ConsensusFeature const &left, ConsensusFeature const &right) const |
Compute the similarity for a pair of elements. More... | |
Protected Member Functions inherited from BaseGroupFinder | |
void | checkIds_ (const std::vector< ConsensusMap > &maps) const |
Checks if all file descriptions have disjoint map identifiers. More... | |
Protected Member Functions inherited from DefaultParamHandler | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Protected Attributes | |
double | diff_exponent_ [2] |
A parameter for similarity_(). More... | |
double | diff_intercept_ [2] |
A parameter for similarity_(). More... | |
double | pair_min_quality_ |
Minimal pair quality. 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< String > | subsections_ |
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... | |
Protected Attributes inherited from ProgressLogger | |
LogType | type_ |
time_t | last_invoke_ |
ProgressLoggerImpl * | current_logger_ |
Additional Inherited Members | |
Static Protected Member Functions inherited from ProgressLogger | |
static String | logTypeToFactoryName_ (LogType type) |
Return the name of the factory product used for this log type. More... | |
Static Protected Attributes inherited from ProgressLogger | |
static int | recursion_depth_ |
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:
Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
similarity:pair_min_quality | float | 0.01 | Minimum required pair quality. | |
similarity:diff_intercept:RT | float | 1.0 | This parameter controls the asymptotic decay rate for large differences (for more details see the similarity measurement). | |
similarity:diff_intercept:MZ | float | 0.1 | This parameter controls the asymptotic decay rate for large differences (for more details see the similarity measurement). | |
similarity:diff_exponent:RT | float | 2.0 | This parameter is important for small differences (for more details see the similarity measurement). | |
similarity:diff_exponent:MZ | float | 1.0 | This parameter is important for small differences (for more details see the similarity measurement). |
typedef BaseGroupFinder Base |
Base class.
SimplePairFinder | ( | ) |
Constructor.
|
inlineoverride |
Destructor.
|
inlinestatic |
returns an instance of this class
|
inlinestatic |
returns the name of this module
|
overridevirtual |
Run the algorithm.
Exception::IllegalArgument | is thrown if the input data is not valid. |
Implements BaseGroupFinder.
|
protected |
Compute the similarity for a pair of elements.
|
overrideprotectedvirtual |
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.
|
protected |
A parameter for similarity_().
|
protected |
A parameter for similarity_().
|
protected |
Minimal pair quality.