computes empirical formulas for given mass differences using a set of allowed elements More...
#include <OpenMS/DATASTRUCTURES/MassExplainer.h>
Public Types | |
typedef Adduct::AdductsType | AdductsType |
typedef std::vector< Compomer >::const_iterator | CompomerIterator |
Public Member Functions | |
void | compute () |
fill map with possible mass-differences along with their explanation More... | |
SignedSize | query (const Int net_charge, const float mass_to_explain, const float mass_delta, const float thresh_log_p, std::vector< Compomer >::const_iterator &firstExplanation, std::vector< Compomer >::const_iterator &lastExplanation) const |
void | setAdductBase (AdductsType adduct_base) |
Sets the set of possible adducts. More... | |
AdductsType | getAdductBase () const |
Returns the set of adducts. More... | |
const Compomer & | getCompomerById (Size id) const |
return a compomer by its Id (useful after a query() ). More... | |
Protected Member Functions | |
bool | compomerValid_ (const Compomer &cmp) |
check if the generated compomer is valid judged by its probability, charges etc More... | |
Adduct | createAdduct_ (const String &formula, const Int charge, const double p) const |
create a proper adduct from formula and charge and probability More... | |
Protected Attributes | |
std::vector< Compomer > | explanations_ |
store possible explanations (as formula) for a certain ChargeDifference and MassDifference More... | |
AdductsType | adduct_base_ |
all allowed adducts, whose combination explains the mass difference More... | |
Int | q_min_ |
minimal expected charge More... | |
Int | q_max_ |
maximal expected charge More... | |
Int | max_span_ |
maximal span (in terms of charge) for co-features, e.g. a cluster with q={3,6} has span=4 More... | |
double | thresh_p_ |
minimum required probability of a compound (all other compounds are discarded) More... | |
Size | max_neutrals_ |
Maximum number of neutral(q=0) adducts. More... | |
Constructors and destructor | |
MassExplainer () | |
Default constructor. More... | |
MassExplainer (AdductsType adduct_base) | |
Constructor. More... | |
MassExplainer (Int q_min, Int q_max, Int max_span, double thresh_logp) | |
Constructor. More... | |
MassExplainer (AdductsType adduct_base, Int q_min, Int q_max, Int max_span, double thresh_logp, Size max_neutrals) | |
Constructor. More... | |
MassExplainer & | operator= (const MassExplainer &rhs) |
Assignment operator. More... | |
virtual | ~MassExplainer () |
Destructor. More... | |
void | init_ (bool init_thresh_p) |
computes empirical formulas for given mass differences using a set of allowed elements
typedef Adduct::AdductsType AdductsType |
typedef std::vector<Compomer>::const_iterator CompomerIterator |
MassExplainer | ( | ) |
Default constructor.
MassExplainer | ( | AdductsType | adduct_base | ) |
Constructor.
MassExplainer | ( | Int | q_min, |
Int | q_max, | ||
Int | max_span, | ||
double | thresh_logp | ||
) |
Constructor.
MassExplainer | ( | AdductsType | adduct_base, |
Int | q_min, | ||
Int | q_max, | ||
Int | max_span, | ||
double | thresh_logp, | ||
Size | max_neutrals | ||
) |
Constructor.
|
virtual |
Destructor.
|
protected |
check if the generated compomer is valid judged by its probability, charges etc
void compute | ( | ) |
fill map with possible mass-differences along with their explanation
create a proper adduct from formula and charge and probability
AdductsType getAdductBase | ( | ) | const |
Returns the set of adducts.
return a compomer by its Id (useful after a query() ).
|
private |
check consistency of input
init_thresh_p | set default threshold (set to "false" to keep current value) |
MassExplainer& operator= | ( | const MassExplainer & | rhs | ) |
Assignment operator.
SignedSize query | ( | const Int | net_charge, |
const float | mass_to_explain, | ||
const float | mass_delta, | ||
const float | thresh_log_p, | ||
std::vector< Compomer >::const_iterator & | firstExplanation, | ||
std::vector< Compomer >::const_iterator & | lastExplanation | ||
) | const |
search the mass database for explanations
net_charge | net charge of compomer seeked |
mass_to_explain | mass in Da that needs explanation |
mass_delta | allowed deviation from exact mass |
thresh_log_p | minimal log probability required |
firstExplanation | begin range with candidates according to net_charge and mass |
lastExplanation | end range |
void setAdductBase | ( | AdductsType | adduct_base | ) |
Sets the set of possible adducts.
|
protected |
all allowed adducts, whose combination explains the mass difference
|
protected |
store possible explanations (as formula) for a certain ChargeDifference and MassDifference
|
protected |
Maximum number of neutral(q=0) adducts.
|
protected |
maximal span (in terms of charge) for co-features, e.g. a cluster with q={3,6} has span=4
|
protected |
maximal expected charge
|
protected |
minimal expected charge
|
protected |
minimum required probability of a compound (all other compounds are discarded)
OpenMS / TOPP release 2.3.0 | Documentation generated on Tue Jan 9 2018 18:22:10 using doxygen 1.8.13 |