IMSIsotopeDistribution#

class pyopenms.IMSIsotopeDistribution#

Bases: object

Cython implementation of _IMSIsotopeDistribution

Original C++ documentation is available here

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

  • IsotopeDistribution

    (18.00221; 99.03 %) (19.00334; 0.8 %) (20.00476; 0.17 %)

  • IsotopeSpecies

    (18.00197; 98.012 %) (18.00989; 1.018 %) (19.00312; 0.683 %) (19.00531; 0.117 %) (20.00413; 0.134 %) (20.00831; 0.036 %)

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. doi: 10.1007/11851561_2

Folding with itself is done using Russian Multiplication Scheme

__init__()#

Overload:

__init__(self) None

Overload:

__init__(self, in_0: IMSIsotopeDistribution) None

Overload:

__init__(self, nominalMass: int) None

Overload:

__init__(self, mass: float) None

Overload:

__init__(self, peaks: List[IMSIsotopeDistribution_Peak], nominalMass: int) None

Methods

__init__

Overload:

empty(self)

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

getAbundance(self, i)

getAbundances(self)

Gets an abundance of isotope 'i'

getAverageMass(self)

getMass(self, i)

getMasses(self)

Gets a mass of isotope 'i'

getNominalMass(self)

normalize(self)

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

setNominalMass(self, nominalMass)

size(self)

Attributes

ABUNDANCES_SUM_ERROR

SIZE

ABUNDANCES_SUM_ERROR#
SIZE#
empty(self) bool#

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

getAbundance(self, i: int) float#
getAbundances(self) List[float]#

Gets an abundance of isotope ‘i’

getAverageMass(self) float#
getMass(self, i: int) float#
getMasses(self) List[float]#

Gets a mass of isotope ‘i’

getNominalMass(self) int#
normalize(self) None#

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

setNominalMass(self, nominalMass: int) None#
size(self) int#