OpenMS
Loading...
Searching...
No Matches
FeatureDeconvolution.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Chris Bielow $
6// $Authors: $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11// OpenMS
17
19#include <map>
20
21namespace OpenMS
22{
23
24 class Compomer;
25
34 class OPENMS_DLLAPI FeatureDeconvolution :
36 {
37public:
38
39 enum CHARGEMODE {QFROMFEATURE = 1, QHEURISTIC, QALL};
40
44
50
53
56
60
71 void compute(const FeatureMap& fm_in, FeatureMap& fm_out, ConsensusMap& cons_map, ConsensusMap& cons_map_p);
72
73protected:
74
75 void updateMembers_() override;
76
82 struct CmpInfo_;
83
84 /*
85 @brief test for obviously wrong parameter settings and warn
86
87 Currently supports the following scenarios:
88 * If the lower charge bound is too high, consensus features with gapped, even charges will occur (e.g. 30,32,34), instead of the true (15,16,17)
89 When more than 5% of the cf's look like this, we report it.
90
91 */
92 void checkSolution_(const ConsensusMap& cons_map) const;
93
98 void inferMoreEdges_(PairsType& edges, std::map<Size, std::set<CmpInfo_> >& feature_adducts);
99
101 void printEdgesOfConnectedFeatures_(Size idx_1, Size idx_2, const PairsType& feature_relation);
102
109 inline bool intensityFilterPassed_(const Int q1, const Int q2, const Compomer& cmp, const Feature& f1, const Feature& f2) const;
110
117 bool chargeTestworthy_(const Int feature_charge, const Int putative_charge, const bool other_unchanged) const;
118
122 std::map<Size, String> map_label_;
124 std::map<String, Size> map_label_inverse_;
131
132 };
133} // namespace OpenMS
Holds information on an edge connecting two features from a (putative) charge ladder.
Definition Compomer.h:51
A container for consensus elements.
Definition ConsensusMap.h:68
Representation of a coordinate in D-dimensional space.
Definition DPosition.h:32
A base class for all classes handling default parameters.
Definition DefaultParamHandler.h:66
An algorithm to decharge features (i.e. as found by FeatureFinder).
Definition FeatureDeconvolution.h:36
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
bool chargeTestworthy_(const Int feature_charge, const Int putative_charge, const bool other_unchanged) const
determines if we should test a putative feature charge
DPosition< 2 > ClusterPointType
Definition FeatureDeconvolution.h:41
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.
bool enable_intensity_filter_
status of intensity filter for edges
Definition FeatureDeconvolution.h:126
void checkSolution_(const ConsensusMap &cons_map) const
CHARGEMODE
Definition FeatureDeconvolution.h:39
CHARGEMODE q_try_
status of charge discovery
Definition FeatureDeconvolution.h:128
std::map< Size, String > map_label_
labeling table
Definition FeatureDeconvolution.h:122
~FeatureDeconvolution() override
destructor
Feature::CoordinateType CoordinateType
Definition FeatureDeconvolution.h:42
void inferMoreEdges_(PairsType &edges, std::map< Size, std::set< CmpInfo_ > > &feature_adducts)
FeatureDeconvolution & operator=(const FeatureDeconvolution &source)
Assignment operator.
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
MassExplainer::AdductsType potential_adducts_
List of adducts used to explain mass differences.
Definition FeatureDeconvolution.h:120
std::map< String, Size > map_label_inverse_
labeling table inverse
Definition FeatureDeconvolution.h:124
FeatureDeconvolution()
default constructor
Int verbose_level_
amount of debug information displayed
Definition FeatureDeconvolution.h:130
FeatureDeconvolution(const FeatureDeconvolution &source)
Copy constructor.
void printEdgesOfConnectedFeatures_(Size idx_1, Size idx_2, const PairsType &feature_relation)
A function mostly for debugging.
ILPDCWrapper::PairsType PairsType
Definition FeatureDeconvolution.h:43
A container for features.
Definition FeatureMap.h:82
An LC-MS feature.
Definition Feature.h:46
std::vector< ChargePair > PairsType
Definition ILPDCWrapper.h:29
Adduct::AdductsType AdductsType
Type definition for a vector of Adduct objects.
Definition MassExplainer.h:44
double CoordinateType
Coordinate type (of the position)
Definition Peak2D.h:39
int Int
Signed integer type.
Definition Types.h:72
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19