OpenMS
|
An algorithm to decharge small molecule features (i.e. as found by FeatureFinder). More...
#include <OpenMS/ANALYSIS/DECHARGING/MetaboliteFeatureDeconvolution.h>
Public Types | |
enum | CHARGEMODE { QFROMFEATURE = 1 , QHEURISTIC , QALL } |
typedef DPosition< 2 > | ClusterPointType |
typedef Feature::CoordinateType | CoordinateType |
typedef ILPDCWrapper::PairsType | PairsType |
Constructors and Destructor s | |
MassExplainer::AdductsType | potential_adducts_ |
List of adducts used to explain mass differences. More... | |
std::map< Size, String > | map_label_ |
labeling table More... | |
std::map< String, Size > | map_label_inverse_ |
labeling table inverse More... | |
bool | enable_intensity_filter_ |
status of intensity filter for edges More... | |
bool | negative_mode_ |
status of ionization mode More... | |
CHARGEMODE | q_try_ |
status of charge discovery More... | |
Int | verbose_level_ |
amount of debug information displayed More... | |
MetaboliteFeatureDeconvolution () | |
default constructor More... | |
MetaboliteFeatureDeconvolution (const MetaboliteFeatureDeconvolution &source) | |
Copy constructor. More... | |
MetaboliteFeatureDeconvolution & | operator= (const MetaboliteFeatureDeconvolution &source) |
Assignment operator. More... | |
~MetaboliteFeatureDeconvolution () override | |
destructor More... | |
void | compute (const FeatureMap &fm_in, FeatureMap &fm_out, ConsensusMap &cons_map, ConsensusMap &cons_map_p) |
Compute a zero-charge feature map from a set of charged features. More... | |
void | updateMembers_ () override |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
void | checkSolution_ (const ConsensusMap &cons_map) const |
void | inferMoreEdges_ (PairsType &edges, std::map< Size, std::set< CmpInfo_ >> &feature_adducts) |
void | candidateEdges_ (FeatureMap &fm_out, const Adduct &default_adduct, PairsType &feature_relation, std::map< Size, std::set< CmpInfo_ >> &feature_adducts) |
void | annotate_feature_ (FeatureMap &fm_out, Adduct &default_adduct, Compomer &c, const Size f_idx, const UInt side, const Int new_q, const Int old_q) |
void | printEdgesOfConnectedFeatures_ (Size idx_1, Size idx_2, const PairsType &feature_relation) |
A function mostly for debugging. More... | |
bool | intensityFilterPassed_ (const Int q1, const Int q2, const Compomer &cmp, const Feature &f1, const Feature &f2) const |
returns true if the intensity filter was passed or switched off More... | |
bool | chargeTestworthy_ (const Int feature_charge, const Int putative_charge, const bool other_unchanged) const |
determines if we should test a putative feature charge More... | |
Additional Inherited Members | |
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 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 inherited from DefaultParamHandler | |
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... | |
An algorithm to decharge small molecule features (i.e. as found by FeatureFinder).
Parameters of this class are:Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
charge_min | int | 1 | Minimal possible charge | |
charge_max | int | 3 | Maximal possible charge | |
charge_span_max | int | 3 | min: 1 | Maximal range of charges for a single analyte, i.e. observing q1=[5,6,7] implies span=3. Setting this to 1 will only find adduct variants of the same charge |
q_try | string | feature | feature, heuristic, all | Try different values of charge for each feature according to the above settings ('heuristic' [does not test all charges, just the likely ones] or 'all' ), or leave feature charge untouched ('feature'). |
retention_max_diff | float | 1.0 | Maximum allowed RT difference between any two features if their relation shall be determined | |
retention_max_diff_local | float | 1.0 | Maximum allowed RT difference between between two co-features, after adduct shifts have been accounted for (if you do not have any adduct shifts, this value should be equal to 'retention_max_diff', otherwise it should be smaller!) | |
mass_max_diff | float | 0.05 | min: 0.0 | Maximum allowed mass tolerance per feature. Defines a symmetric tolerance window around the feature. When looking at possible feature pairs, the allowed feature-wise errors are combined for consideration of possible adduct shifts. For ppm tolerances, each window is based on the respective observed feature mz (instead of putative experimental mzs causing the observed one)! |
unit | string | Da | Da, ppm | Unit of the 'max_difference' parameter |
potential_adducts | string list | [H:+:0.4, Na:+:0.25, NH4:+:0.25, K:+:0.1, H-2O-1:0:0.05] | Adducts used to explain mass differences in format: 'Elements:Charge(+/-/0):Probability[:RTShift[:Label]]', i.e. the number of '+' or '-' indicate the charge ('0' if neutral adduct), e.g. 'Ca:++:0.5' indicates +2. Probabilites have to be in (0,1]. The optional RTShift param indicates the expected RT shift caused by this adduct, e.g. '(2)H4H-4:0:1:-3' indicates a 4 deuterium label, which causes early elution by 3 seconds. As fifth parameter you can add a label for every feature with this adduct. This also determines the map number in the consensus file. Adduct element losses are written in the form 'H-2'. All provided adducts need to have the same charge sign or be neutral! Mixing of adducts with different charge directions is only allowed as neutral complexes. For example, 'H-1Na:0:0.05' can be used to model Sodium gains (with balancing deprotonation) in negative mode. | |
max_neutrals | int | 1 | Maximal number of neutral adducts(q=0) allowed. Add them in the 'potential_adducts' section! | |
use_minority_bound | string | true | true, false | Prune the considered adduct transitions by transition probabilities. |
max_minority_bound | int | 3 | min: 0 | Limits allowed adduct compositions and changes between compositions in the underlying graph optimization problem by introducing a probability-based threshold: the minority bound sets the maximum count of the least probable adduct (according to 'potential_adducts' param) within a charge variant with maximum charge only containing the most likely adduct otherwise. E.g., for 'charge_max' 4 and 'max_minority_bound' 2 with most probable adduct being H+ and least probable adduct being Na+, this will allow adduct compositions of '2(H+),2(Na+)' but not of '1(H+),3(Na+)'. Further, adduct compositions/changes less likely than '2(H+),2(Na+)' will be discarded as well. |
min_rt_overlap | float | 0.66 | min: 0.0 max: 1.0 | Minimum overlap of the convex hull' RT intersection measured against the union from two features (if CHs are given) |
intensity_filter | string | false | true, false | Enable the intensity filter, which will only allow edges between two equally charged features if the intensity of the feature with less likely adducts is smaller than that of the other feature. It is not used for features of different charge. |
negative_mode | string | false | true, false | Enable negative ionization mode. |
default_map_label | string | decharged features | Label of map in output consensus file where all features are put by default | |
verbose_level | int | 0 | min: 0 max: 3 | Amount of debug information given during processing. |
typedef DPosition<2> ClusterPointType |
typedef ILPDCWrapper::PairsType PairsType |
enum CHARGEMODE |
default constructor
MetaboliteFeatureDeconvolution | ( | const MetaboliteFeatureDeconvolution & | source | ) |
Copy constructor.
|
override |
destructor
|
protected |
|
protected |
|
protected |
determines if we should test a putative feature charge
Answer query given the internal status of q_try. Features with q<=0 always return true.
|
protected |
void compute | ( | const FeatureMap & | fm_in, |
FeatureMap & | fm_out, | ||
ConsensusMap & | cons_map, | ||
ConsensusMap & | cons_map_p | ||
) |
Compute a zero-charge feature map from a set of charged features.
Find putative ChargePairs, then score them and hand over to ILP.
fm_in | Input feature-map |
fm_out | Output feature-map (sorted by position and augmented with user params) |
cons_map | [out] Output of grouped features belonging to a charge group |
cons_map_p | [out] Output of paired features connected by an edge |
|
protected |
test if "simple" edges have alternative (more difficult explanation) supported by neighboring edges e.g. (.) -> (H+) might be augmented to (Na+) -> (H+Na+)
|
inlineprotected |
returns true if the intensity filter was passed or switched off
Filter for adding an edge only when the two features connected by it, fulfill the intensity criterion.
MetaboliteFeatureDeconvolution& operator= | ( | const MetaboliteFeatureDeconvolution & | source | ) |
Assignment operator.
|
protected |
A function mostly for debugging.
|
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 |
status of intensity filter for edges
|
protected |
status of ionization mode
|
protected |
List of adducts used to explain mass differences.
|
protected |
status of charge discovery
|
protected |
amount of debug information displayed