OpenMS  2.7.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
FeatureGroupingAlgorithmUnlabeled Class Reference

A map feature grouping algorithm for unlabeled data. More...

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

Inheritance diagram for FeatureGroupingAlgorithmUnlabeled:
[legend]
Collaboration diagram for FeatureGroupingAlgorithmUnlabeled:
[legend]

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...
 
ConsensusMapgetResultMap ()
 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...
 
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...
 

Static Public Member Functions

static FeatureGroupingAlgorithmcreate ()
 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 &prefix="")
 Writes all parameters to meta values. More...
 

Private Member Functions

 FeatureGroupingAlgorithmUnlabeled (const FeatureGroupingAlgorithmUnlabeled &)
 Copy constructor intentionally not implemented -> private. More...
 
FeatureGroupingAlgorithmUnlabeledoperator= (const FeatureGroupingAlgorithmUnlabeled &)
 Assignment operator intentionally not implemented -> private. More...
 

Private Attributes

std::vector< ConsensusMappairfinder_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< 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...
 

Detailed Description

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:

NameTypeDefaultRestrictionsDescription
second_nearest_gap float2.0 min: 1.0Only 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 stringfalse true, falseNever 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 stringfalse true, falsefalse [default]: pairing requires equal charge state (or at least one unknown charge '0'); true: Pairing irrespective of charge state
ignore_adduct stringtrue true, falsetrue [default]: pairing requires equal adducts (or at least one without adduct annotation); true: Pairing irrespective of adducts
distance_RT:max_difference float100.0 min: 0.0Never pair features with a larger RT distance (in seconds).
distance_RT:exponent float1.0 min: 0.0Normalized 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 float1.0 min: 0.0Final RT distances are weighted by this factor
distance_MZ:max_difference float0.3 min: 0.0Never pair features with larger m/z distance (unit defined by 'unit')
distance_MZ:unit stringDa Da, ppmUnit of the 'max_difference' parameter
distance_MZ:exponent float2.0 min: 0.0Normalized ([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 float1.0 min: 0.0Final m/z distances are weighted by this factor
distance_intensity:exponent float1.0 min: 0.0Differences 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 float0.0 min: 0.0Final intensity distances are weighted by this factor
distance_intensity:log_transform stringdisabled enabled, disabledLog-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))

Note:

Constructor & Destructor Documentation

◆ FeatureGroupingAlgorithmUnlabeled() [1/2]

Default constructor.

◆ ~FeatureGroupingAlgorithmUnlabeled()

Destructor.

◆ FeatureGroupingAlgorithmUnlabeled() [2/2]

Copy constructor intentionally not implemented -> private.

Member Function Documentation

◆ addToGroup()

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!

Exceptions
IllegalArgumentis thrown if the map_id has been used before

◆ create()

static FeatureGroupingAlgorithm* create ( )
inlinestatic

Creates a new instance of this class (for Factory)

◆ getProductName()

static String getProductName ( )
inlinestatic

Returns the product name (for the Factory)

◆ getResultMap()

ConsensusMap& getResultMap ( )
inline

Returns the computed consensus map (after calling addToGroup with all maps)

◆ group()

void group ( const std::vector< FeatureMap > &  maps,
ConsensusMap out 
)
overridevirtual

Applies the algorithm.

Exceptions
IllegalArgumentis thrown if less than two input maps are given.

Implements FeatureGroupingAlgorithm.

◆ operator=()

Assignment operator intentionally not implemented -> private.

◆ setReference()

void setReference ( int  map_id,
const MapType map 
)
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().

Member Data Documentation

◆ pairfinder_input_

std::vector<ConsensusMap> pairfinder_input_
private