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

IMSIsotopeDistribution Class Reference

Represents a distribution of isotopes restricted to the first K elements. More...

#include <OpenMS/CHEMISTRY/MASSDECOMPOSITION/IMS/IMSIsotopeDistribution.h>

List of all members.

Classes

struct  Peak
 Structure that represents an isotope peak - pair of mass and abundance. More...

Public Types

typedef double mass_type
 Type of isotope mass.
typedef double abundance_type
 Type of isotope abundance.
typedef unsigned int nominal_mass_type
 Type of isotope nominal mass.
typedef Peak peak_type
 Type of isotope peak.
typedef std::vector< peak_typepeaks_container
 Type of container to store peaks.
typedef peaks_container::iterator peaks_iterator
 Type of iterator over container with peaks.
typedef
peaks_container::const_iterator 
const_peaks_iterator
 Type of const iterator over container with peaks.
typedef peaks_container::size_type size_type
 Type of peaks container's size.
typedef std::vector< mass_typemasses_container
 Type of container with isotope masses.
typedef masses_container::iterator masses_iterator
 Type of iterator over container with isotope masses.
typedef
masses_container::const_iterator 
const_masses_iterator
 Type of const iterator over container with isotope masses.
typedef std::vector
< abundance_type
abundances_container
 Type of container with isotope abundances.
typedef
abundances_container::iterator 
abundances_iterator
 Type of iterator over container with isotope abundances.
typedef
abundances_container::const_iterator 
const_abundances_iterator
 Type of const iterator over container with isotope abundances.

Public Member Functions

 IMSIsotopeDistribution (nominal_mass_type nominalMass=0)
 Constructor with nominal mass.
 IMSIsotopeDistribution (mass_type mass)
 Constructor with single isotope.
 IMSIsotopeDistribution (const peaks_container &peaks, nominal_mass_type nominalMass=0)
 Constructor with isotopes and nominal mass.
 IMSIsotopeDistribution (const IMSIsotopeDistribution &distribution)
 Copy constructor.
 ~IMSIsotopeDistribution ()
 Destructor.
size_type size () const
IMSIsotopeDistributionoperator= (const IMSIsotopeDistribution &distribution)
bool operator== (const IMSIsotopeDistribution &distribution) const
bool operator!= (const IMSIsotopeDistribution &distribution) const
IMSIsotopeDistributionoperator*= (const IMSIsotopeDistribution &distribution)
IMSIsotopeDistributionoperator*= (unsigned int pow)
mass_type getMass (size_type i) const
abundance_type getAbundance (size_type i) const
mass_type getAverageMass () const
nominal_mass_type getNominalMass () const
void setNominalMass (nominal_mass_type nominalMass)
masses_container getMasses () const
abundances_container getAbundances () const
void normalize ()
bool empty () const

Static Public Attributes

static abundance_type ABUNDANCES_SUM_ERROR
 Error to be allowed for isotope distribution.
static size_type SIZE
 Length of isotope distribution.

Private Member Functions

void setMinimumSize_ ()
 Sets peaks/isotopes container minimum size.

Private Attributes

peaks_container peaks_
 Container for isotopes.
nominal_mass_type nominal_mass_
 Nominal mass of distribution.

Detailed Description

Represents a distribution of isotopes restricted to the first K elements.

Represents a distribution of isotopes of chemical elements as a list of peaks each as a pair of mass and abundance. IsotopeDistribution unlike IsotopeSpecies has one abundance per a nominal mass. Here is an example in the format (mass; abundance %) for molecule H2O (values are taken randomly):

To the sake of faster computations distribution is restricted to the first K elements, where K can be set by adjusting size SIZE of distribution.

Note:
For the elements most abundant in living beings (CHNOPS) this restriction is negligible, since abundances decrease dramatically in isotopes order and are usually of no interest starting from +10 isotope.

IsotopeDistribution implements folding with other distribution using an algorithm described in details in paper: Boecker et al. "Decomposing metabolic isotope patterns" WABI 2006.

Folding with itself is done using Russian Multiplication Scheme.

Author:
Anton Pervukhin <Anton.Pervukhin@CeBiTec.Uni-Bielefeld.DE>

Member Typedef Documentation

Type of isotope abundance.

typedef std::vector<abundance_type> abundances_container

Type of container with isotope abundances.

typedef abundances_container::iterator abundances_iterator

Type of iterator over container with isotope abundances.

typedef abundances_container::const_iterator const_abundances_iterator

Type of const iterator over container with isotope abundances.

typedef masses_container::const_iterator const_masses_iterator

Type of const iterator over container with isotope masses.

typedef peaks_container::const_iterator const_peaks_iterator

Type of const iterator over container with peaks.

typedef double mass_type

Type of isotope mass.

typedef std::vector<mass_type> masses_container

Type of container with isotope masses.

typedef masses_container::iterator masses_iterator

Type of iterator over container with isotope masses.

typedef unsigned int nominal_mass_type

Type of isotope nominal mass.

typedef Peak peak_type

Type of isotope peak.

typedef std::vector<peak_type> peaks_container

Type of container to store peaks.

typedef peaks_container::iterator peaks_iterator

Type of iterator over container with peaks.

typedef peaks_container::size_type size_type

Type of peaks container's size.


Constructor & Destructor Documentation

IMSIsotopeDistribution ( nominal_mass_type  nominalMass = 0  )  [inline, explicit]

Constructor with nominal mass.

IMSIsotopeDistribution ( mass_type  mass  )  [inline, explicit]

Constructor with single isotope.

IMSIsotopeDistribution ( const peaks_container peaks,
nominal_mass_type  nominalMass = 0 
) [inline]

Constructor with isotopes and nominal mass.

IMSIsotopeDistribution ( const IMSIsotopeDistribution distribution  )  [inline]

Copy constructor.

~IMSIsotopeDistribution (  )  [inline]

Destructor.


Member Function Documentation

bool empty (  )  const [inline]

Returns true if the distribution has no peaks, false - otherwise.

Returns:
True if the distribution has no peaks, false - otherwise.
abundance_type getAbundance ( size_type  i  )  const [inline]

Gets an abundance of isotope i.

Parameters:
i An index of isotope.
Returns:
An abundance of isotope i.
abundances_container getAbundances (  )  const

Gets abundances of isotopes.

Returns:
Abundances of isotopes.
mass_type getAverageMass (  )  const

Gets an average mass of all isotopes.

Returns:
An average mass of all isotopes.
mass_type getMass ( size_type  i  )  const [inline]

Gets a mass of isotope i.

Parameters:
i An index of isotope.
Returns:
Mass of isotope i.
masses_container getMasses (  )  const

Gets masses of isotopes.

Returns:
Masses of isotopes.
nominal_mass_type getNominalMass (  )  const [inline]

Gets a nominal mass of distribution.

Returns:
The nominal mass of the distribution.
void normalize (  ) 

Normalizes distribution, i.e. scaling abundances to be summed up to 1 with an error ABUNDANCES_SUM_ERROR allowed.

bool operator!= ( const IMSIsotopeDistribution distribution  )  const

Inequality operator. Returns true, if a given distribution is unequal to this one, false - otherwise.

Returns:
true, if a given distribution is unequal to this distribution, false - otherwise
IMSIsotopeDistribution& operator*= ( unsigned int  pow  ) 

Operator for folding this distribution with itself pow times.

Note:
Operator is unary, so result is stored in this object itself.
Parameters:
pow Number of times this distribution is to be folded with itself.
Returns:
Reference to this object.
See also:
IsotopeDistribution& operator *=(const IsotopeDistribution&)
IMSIsotopeDistribution& operator*= ( const IMSIsotopeDistribution distribution  ) 

Operator for folding this distributoin with a given distribution.

Note:
Operator is unary, so result is stored in this object itself.
Parameters:
distribution Distribution to be folded with this one.
Returns:
Reference to this object.
See also:
IsotopeDistribution& operator *=(unsigned int)
IMSIsotopeDistribution& operator= ( const IMSIsotopeDistribution distribution  ) 

Assignment operator.

Parameters:
distribution Isotope distribution to be assigned to this one.
Returns:
Reference to this object.
bool operator== ( const IMSIsotopeDistribution distribution  )  const

Equality operator. Returns true, if a given distribution is equal to this one, false - otherwise.

Returns:
true, if a given distribution is equal to this distribution, false - otherwise
void setMinimumSize_ (  )  [private]

Sets peaks/isotopes container minimum size.

void setNominalMass ( nominal_mass_type  nominalMass  )  [inline]

Sets a nominal mass for distribution.

Parameters:
nominalMass The new nominal mass for the distributoin.
size_type size (  )  const [inline]

Gets size of isotope distribution.

Note:
Size is not smaller than predefined SIZE.
Returns:
Size of isotope distribution.

Member Data Documentation

Error to be allowed for isotope distribution.

Nominal mass of distribution.

Container for isotopes.

size_type SIZE [static]

Length of isotope distribution.


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