Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

MassExplainer Class Reference
[Datastructures]

computes empirical formulas for given mass differences using a set of allowed elements More...

#include <OpenMS/DATASTRUCTURES/MassExplainer.h>

List of all members.

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
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.
AdductsType getAdductBase () const
 Returns the set of adducts.
const CompomergetCompomerById (Size id) const
 return a compomer by its Id (useful after a query() ).

Protected Member Functions

bool compomerValid_ (const Compomer &cmp)
 check if the generated compomer is valid judged by its probability, charges etc
Adduct createAdduct_ (const String &formula, const Int charge, const DoubleReal p) const
 create a proper adduct from formula and charge and probability

Protected Attributes

std::vector< Compomerexplanations_
 store possible explanations (as formula) for a certain ChargeDifference and MassDifference
AdductsType adduct_base_
 all allowed adducts, whose combination explains the mass difference
Int q_min_
 minimal expected charge
Int q_max_
 maximal expected charge
Int max_span_
 maximal span (in terms of charge) for co-features, e.g. a cluster with q={3,6} has span=4
DoubleReal thresh_p_
 minimum required probability of a compound (all other compounds are discarded)
Size max_neutrals_
 Maximum number of neutral(q=0) adducts.

Constructors and destructor



 MassExplainer ()
 Default constructor.
 MassExplainer (AdductsType adduct_base)
 Constructor.
 MassExplainer (Int q_min, Int q_max, Int max_span, DoubleReal thresh_logp)
 Constructor.
 MassExplainer (AdductsType adduct_base, Int q_min, Int q_max, Int max_span, DoubleReal thresh_logp, Size max_neutrals)
 Constructor.
MassExplaineroperator= (const MassExplainer &rhs)
 Assignment operator.
virtual ~MassExplainer ()
 Destructor.
void init_ (bool init_thresh_p)

Detailed Description

computes empirical formulas for given mass differences using a set of allowed elements


Member Typedef Documentation

typedef std::vector<Compomer>::const_iterator CompomerIterator

Constructor & Destructor Documentation

MassExplainer (  ) 

Default constructor.

MassExplainer ( AdductsType  adduct_base  ) 

Constructor.

MassExplainer ( Int  q_min,
Int  q_max,
Int  max_span,
DoubleReal  thresh_logp 
)

Constructor.

MassExplainer ( AdductsType  adduct_base,
Int  q_min,
Int  q_max,
Int  max_span,
DoubleReal  thresh_logp,
Size  max_neutrals 
)

Constructor.

virtual ~MassExplainer (  )  [virtual]

Destructor.


Member Function Documentation

bool compomerValid_ ( const Compomer cmp  )  [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

Adduct createAdduct_ ( const String formula,
const Int  charge,
const DoubleReal  p 
) const [protected]

create a proper adduct from formula and charge and probability

AdductsType getAdductBase (  )  const

Returns the set of adducts.

const Compomer& getCompomerById ( Size  id  )  const

return a compomer by its Id (useful after a query() ).

void init_ ( bool  init_thresh_p  )  [private]

check consistency of input

Parameters:
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

Parameters:
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.


Member Data Documentation

all allowed adducts, whose combination explains the mass difference

std::vector<Compomer> explanations_ [protected]

store possible explanations (as formula) for a certain ChargeDifference and MassDifference

Size max_neutrals_ [protected]

Maximum number of neutral(q=0) adducts.

Int max_span_ [protected]

maximal span (in terms of charge) for co-features, e.g. a cluster with q={3,6} has span=4

Int q_max_ [protected]

maximal expected charge

Int q_min_ [protected]

minimal expected charge

DoubleReal thresh_p_ [protected]

minimum required probability of a compound (all other compounds are discarded)


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:52 using doxygen 1.7.1