IsotopeDistribution

class pyopenms.IsotopeDistribution

Bases: object

Cython implementation of _IsotopeDistribution

Original C++ documentation is available here

Isotope distribution class

A container that holds an isotope distribution. It consists of mass values and their correspondent probabilities (stored in the intensity slot)

Isotope distributions can be calculated using either the CoarseIsotopePatternGenerator for quantized atomic masses which group isotopes with the same atomic number. Alternatively, the FineIsotopePatternGenerator can be used that calculates hyperfine isotopic distributions

This class only describes the container that holds the isotopic distribution, calculations are done using classes derived from IsotopePatternGenerator

__init__()

Overload:

__init__(self) None

Overload:

__init__(self, in_0: IsotopeDistribution) None

Methods

__init__

Overload:

averageMass(self)

Compute average mass of isotope distribution (weighted average of all isotopes)

clear(self)

Clears the distribution and resets max isotope to 0

getContainer(self)

Returns the container which holds the distribution

getMax(self)

Returns the maximal weight isotope which is stored in the distribution

getMin(self)

Returns the minimal weight isotope which is stored in the distribution

getMostAbundant(self)

Returns the most abundant isotope which is stored in the distribution

insert(self, mass, intensity)

merge(self, in_0, in_1)

Merges distributions of arbitrary data points with constant defined resolution

renormalize(self)

Renormalizes the sum of the probabilities of the isotopes to 1

resize(self, size)

Resizes distribution container

set(self, distribution)

Overwrites the container which holds the distribution using 'distribution'

size(self)

Returns the size of the distribution which is the number of isotopes in the distribution

sortByIntensity(self)

Sort isotope distribution by intensity

sortByMass(self)

Sort isotope distribution by mass

trimIntensities(self, cutoff)

Remove intensities below the cutoff

trimLeft(self, cutoff)

Trims the left side of the isotope distribution to isotopes with a significant contribution

trimRight(self, cutoff)

Trims the right side of the isotope distribution to isotopes with a significant contribution

Sorted

alias of pyopenms._pyopenms_2.__Sorted

averageMass(self) float

Compute average mass of isotope distribution (weighted average of all isotopes)

clear(self) None

Clears the distribution and resets max isotope to 0

getContainer(self) List[Peak1D]

Returns the container which holds the distribution

getMax(self) int

Returns the maximal weight isotope which is stored in the distribution

getMin(self) int

Returns the minimal weight isotope which is stored in the distribution

getMostAbundant(self) Peak1D

Returns the most abundant isotope which is stored in the distribution

insert(self, mass: float, intensity: float) None
merge(self, in_0: float, in_1: float) None

Merges distributions of arbitrary data points with constant defined resolution

renormalize(self) None

Renormalizes the sum of the probabilities of the isotopes to 1

resize(self, size: int) None

Resizes distribution container

set(self, distribution: List[Peak1D]) None

Overwrites the container which holds the distribution using ‘distribution’

size(self) int

Returns the size of the distribution which is the number of isotopes in the distribution

sortByIntensity(self) None

Sort isotope distribution by intensity

sortByMass(self) None

Sort isotope distribution by mass

trimIntensities(self, cutoff: float) None

Remove intensities below the cutoff

trimLeft(self, cutoff: float) None

Trims the left side of the isotope distribution to isotopes with a significant contribution

trimRight(self, cutoff: float) None

Trims the right side of the isotope distribution to isotopes with a significant contribution