OpenMS
|
A map feature grouping algorithm for unlabeled data. More...
#include <OpenMS/ANALYSIS/MAPMATCHING/FeatureGroupingAlgorithmUnlabeled.h>
Public Member Functions | |
FeatureGroupingAlgorithmUnlabeled () | |
Default constructor. More... | |
~FeatureGroupingAlgorithmUnlabeled () override | |
Destructor. More... | |
template<typename MapType > | |
void | setReference (int map_id, const MapType &map) |
Sets the reference map for the algorithm. More... | |
ConsensusMap & | getResultMap () |
Returns the computed consensus map (after calling addToGroup with all maps) More... | |
void | group (const std::vector< FeatureMap > &maps, ConsensusMap &out) override |
Applies the algorithm. More... | |
void | addToGroup (int map_id, const FeatureMap &feature_map) |
Adds one map to the group. More... | |
Public Member Functions inherited from FeatureGroupingAlgorithm | |
FeatureGroupingAlgorithm () | |
Default constructor. More... | |
~FeatureGroupingAlgorithm () override | |
Destructor. More... | |
virtual void | group (const std::vector< ConsensusMap > &maps, ConsensusMap &out) |
void | transferSubelements (const std::vector< ConsensusMap > &maps, ConsensusMap &out) const |
Transfers subelements (grouped features) from input consensus maps to the result consensus map. 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... | |
Static Public Member Functions | |
static FeatureGroupingAlgorithm * | create () |
Creates a new instance of this class (for Factory) More... | |
static String | getProductName () |
Returns the product name (for the Factory) More... | |
Static Public Member Functions inherited from FeatureGroupingAlgorithm | |
static void | registerChildren () |
Register all derived classes in this method. 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... | |
Private Member Functions | |
FeatureGroupingAlgorithmUnlabeled (const FeatureGroupingAlgorithmUnlabeled &) | |
Copy constructor intentionally not implemented -> private. More... | |
FeatureGroupingAlgorithmUnlabeled & | operator= (const FeatureGroupingAlgorithmUnlabeled &) |
Assignment operator intentionally not implemented -> private. More... | |
Private Attributes | |
std::vector< ConsensusMap > | pairfinder_input_ |
Additional Inherited Members | |
Protected Member Functions inherited from FeatureGroupingAlgorithm | |
template<class MapType > | |
void | postprocess_ (const std::vector< MapType > &maps, ConsensusMap &out) |
Protected Member Functions inherited from DefaultParamHandler | |
virtual void | updateMembers_ () |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. 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... | |
A map feature grouping algorithm for unlabeled data.
It takes multiple maps and searches for corresponding features. The corresponding features must be aligned, but may have small position deviations.
There are two ways to run the algorithm:
The second way is more memory efficient because at all times, only the reference map and the current map need to be in memory
Parameters of this class are:Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
second_nearest_gap | float | 2.0 | min: 1.0 | Only link features whose distance to the second nearest neighbors (for both sides) is larger by 'second_nearest_gap' than the distance between the matched pair itself. |
use_identifications | string | false | true, false | Never link features that are annotated with different peptides (features without ID's always match; only the best hit per peptide identification is considered). |
ignore_charge | string | false | true, false | false [default]: pairing requires equal charge state (or at least one unknown charge '0'); true: Pairing irrespective of charge state |
ignore_adduct | string | true | true, false | true [default]: pairing requires equal adducts (or at least one without adduct annotation); true: Pairing irrespective of adducts |
distance_RT:max_difference | float | 100.0 | min: 0.0 | Never pair features with a larger RT distance (in seconds). |
distance_RT:exponent | float | 1.0 | min: 0.0 | Normalized RT differences ([0-1], relative to 'max_difference') are raised to this power (using 1 or 2 will be fast, everything else is REALLY slow) |
distance_RT:weight | float | 1.0 | min: 0.0 | Final RT distances are weighted by this factor |
distance_MZ:max_difference | float | 0.3 | min: 0.0 | Never pair features with larger m/z distance (unit defined by 'unit') |
distance_MZ:unit | string | Da | Da, ppm | Unit of the 'max_difference' parameter |
distance_MZ:exponent | float | 2.0 | min: 0.0 | Normalized ([0-1], relative to 'max_difference') m/z differences are raised to this power (using 1 or 2 will be fast, everything else is REALLY slow) |
distance_MZ:weight | float | 1.0 | min: 0.0 | Final m/z distances are weighted by this factor |
distance_intensity:exponent | float | 1.0 | min: 0.0 | Differences in relative intensity ([0-1]) are raised to this power (using 1 or 2 will be fast, everything else is REALLY slow) |
distance_intensity:weight | float | 0.0 | min: 0.0 | Final intensity distances are weighted by this factor |
distance_intensity:log_transform | string | disabled | enabled, disabled | Log-transform intensities? If disabled, d = |int_f2 - int_f1| / int_max. If enabled, d = |log(int_f2 + 1) - log(int_f1 + 1)| / log(int_max + 1)) |
Default constructor.
|
override |
Destructor.
|
private |
Copy constructor intentionally not implemented -> private.
void addToGroup | ( | int | map_id, |
const FeatureMap & | feature_map | ||
) |
Adds one map to the group.
This assumes that setReference has been called before. It is the callers responsibility to provide a valid map_id. Note that all calls to addToGroup _must_ use different map_ids and they all need to be different from the one used to call setReference!
IllegalArgument | is thrown if the map_id has been used before |
|
inlinestatic |
Creates a new instance of this class (for Factory)
|
inline |
Returns the computed consensus map (after calling addToGroup with all maps)
|
overridevirtual |
Applies the algorithm.
IllegalArgument | is thrown if less than two input maps are given. |
Implements FeatureGroupingAlgorithm.
|
private |
Assignment operator intentionally not implemented -> private.
|
inline |
Sets the reference map for the algorithm.
This will store the input map in the first argument of the pairfinder_input_ vector.
Note that map_id needs to be unique (see addToGroup docu).
References MapConversion::convert().
|
private |