Scroll to navigation

IsoSpec::Iso(3) Library Functions Manual IsoSpec::Iso(3)

NAME

IsoSpec::Iso - The Iso class for the calculation of the isotopic distribution.

SYNOPSIS

#include <isoSpec++.h>

Inherited by IsoSpec::IsoGenerator.

Public Member Functions


Iso (int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *_isotopeMasses, const double *_isotopeProbabilities)
General constructror. Iso (int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *const *_isotopeMasses, const double *const *_isotopeProbabilities)
Iso (const char *formula, bool use_nominal_masses=false)
Constructor from the formula object. Iso (const std::string &formula, bool use_nominal_masses=false)
Constructor from C++ std::string chemical formula. Iso (Iso &&other)
The move constructor. Iso & operator= (const Iso &other)=delete
Iso (const Iso &other, bool fullcopy)
The copy constructor. virtual ~Iso ()
Destructor. double getLightestPeakMass () const
Get the mass of the lightest peak in the isotopic distribution. double getHeaviestPeakMass () const
Get the mass of the heaviest peak in the isotopic distribution. double getMonoisotopicPeakMass () const
double getModeLProb () const
Get the log-probability of the mode-configuration (if there are many modes, they share this value). double getUnlikeliestPeakLProb () const
Get the logprobability of the least probable subisotopologue. double getModeMass () const
Get the mass of the mode-configuration (if there are many modes, it is undefined which one will be selected). double getTheoreticalAverageMass () const
Get the theoretical average mass of the molecule. double variance () const
Get the theoretical variance of the distribution. double stddev () const
Get the standard deviation of the theoretical distribution. int getDimNumber () const
Get the number of elements in the chemical formula of the molecule. int getAllDim () const
Get the total number of isotopes of elements present in a chemical formula. void addElement (int atomCount, int noIsotopes, const double *isotopeMasses, const double *isotopeProbabilities)
Add an element to the molecule. Note: this method can only be used BEFORE Iso is used to construct an IsoGenerator instance. void saveMarginalLogSizeEstimates (double *priorities, double target_total_prob) const
Save estimates of logarithms of target sizes of marginals using Gaussian approximation into argument array. Array priorities must have length equal to dimNumber.

Static Public Member Functions


static Iso FromFASTA (const char *fasta, bool use_nominal_masses=false, bool add_water=true)
Constructor (named) from aminoacid FASTA sequence as C string. static Iso FromFASTA (const std::string &fasta, bool use_nominal_masses=false, bool add_water=true)
Constructor (named) from aminoacid FASTA sequence as C++ std::string. See above for details.

Protected Member Functions


bool doMarginalsNeedSorting () const

Protected Attributes


int dimNumber
int * isotopeNumbers
int * atomCounts
unsigned int confSize
int allDim
Marginal ** marginals

Detailed Description

The Iso class for the calculation of the isotopic distribution.

It contains full description of the molecule for which one would like to calculate the isotopic distribution.

Definition at line 49 of file isoSpec++.h.

Constructor & Destructor Documentation

IsoSpec::Iso::Iso ()

Definition at line 50 of file isoSpec++.cpp.

IsoSpec::Iso::Iso (int _dimNumber, const int * _isotopeNumbers, const int * _atomCounts, const double * _isotopeMasses, const double * _isotopeProbabilities)

General constructror.

Parameters

_dimNumber The number of elements in the formula, e.g. for C100H202 it would be 2, as there are only carbon and hydrogen atoms.
_isotopeNumbers A table with numbers of isotopes for each element, e.g. for C100H202 it would be {2, 2}, because both C and H have two stable isotopes.
_atomCounts Number of atoms of each element in the formula, e.g. for C100H202 corresponds to {100, 202}.
_isotopeMasses A table of tables of masses of isotopes of the elements in the chemical formula, e.g. {{12.0, 13.003355}, {1.007825, 2.014102}} for C100H202.
_isotopeProbabilities A table of tables of isotope frequencies of the elements in the chemical formula, e.g. {{.989212, .010788}, {.999885, .000115}} for C100H202.

Definition at line 109 of file isoSpec++.cpp.

IsoSpec::Iso::Iso (int _dimNumber, const int * _isotopeNumbers, const int * _atomCounts, const double *const * _isotopeMasses, const double *const * _isotopeProbabilities)

Definition at line 61 of file isoSpec++.cpp.

IsoSpec::Iso::Iso (const char * formula, bool use_nominal_masses = false)

Constructor from the formula object.

Definition at line 310 of file isoSpec++.cpp.

IsoSpec::Iso::Iso (const std::string & formula, bool use_nominal_masses = false) [inline]

Constructor from C++ std::string chemical formula.

Definition at line 102 of file isoSpec++.h.

IsoSpec::Iso::Iso (Iso && other)

The move constructor.

Definition at line 140 of file isoSpec++.cpp.

IsoSpec::Iso::Iso (const Iso & other, bool fullcopy)

The copy constructor.

Parameters

other The other instance of the Iso class.
fullcopy If false, copy only the number of atoms in the formula, the size of the configuration, the total number of isotopes, and the probability of the mode isotopologue.

Definition at line 153 of file isoSpec++.cpp.

IsoSpec::Iso::~Iso () [virtual]

Destructor.

Definition at line 221 of file isoSpec++.cpp.

Member Function Documentation

void IsoSpec::Iso::addElement (int atomCount, int noIsotopes, const double * isotopeMasses, const double * isotopeProbabilities)

Add an element to the molecule. Note: this method can only be used BEFORE Iso is used to construct an IsoGenerator instance.

Definition at line 324 of file isoSpec++.cpp.

bool IsoSpec::Iso::doMarginalsNeedSorting () const [protected]

Definition at line 232 of file isoSpec++.cpp.

Iso IsoSpec::Iso::FromFASTA (const char * fasta, bool use_nominal_masses = false, bool add_water = true) [static]

Constructor (named) from aminoacid FASTA sequence as C string.

Parameters

fasta An aminoacid FASTA sequence. May be upper/lower/mixed case, may contain selenocystein (U) or xleucine (J). Other characters, including FASTA codes of indeterminate chemical formula (X, *, -, B, ...) are silently ignored. That means 'AEDA', 'AE-DA', 'EAXXDA', 'AE DA' will all result in the same chemical formula. Subisotopologues will be in order: CHNOS, possibly with Se added at an end if present. \use_nominal_masses Whether to use nucleon number instead of the real mass of each isotope during calculations. \add_water Whether the chain should have the terminating -H and -OH groups at the N and C terminus, respectively.

Definition at line 169 of file isoSpec++.cpp.

static Iso IsoSpec::Iso::FromFASTA (const std::string & fasta, bool use_nominal_masses = false, bool add_water = true) [inline], [static]

Constructor (named) from aminoacid FASTA sequence as C++ std::string. See above for details.

Definition at line 116 of file isoSpec++.h.

int IsoSpec::Iso::getAllDim () const [inline]

Get the total number of isotopes of elements present in a chemical formula.

Definition at line 169 of file isoSpec++.h.

int IsoSpec::Iso::getDimNumber () const [inline]

Get the number of elements in the chemical formula of the molecule.

Definition at line 166 of file isoSpec++.h.

double IsoSpec::Iso::getHeaviestPeakMass () const

Get the mass of the heaviest peak in the isotopic distribution.

Definition at line 253 of file isoSpec++.cpp.

double IsoSpec::Iso::getLightestPeakMass () const

Get the mass of the lightest peak in the isotopic distribution.

Definition at line 245 of file isoSpec++.cpp.

double IsoSpec::Iso::getModeLProb () const

Get the log-probability of the mode-configuration (if there are many modes, they share this value).

Definition at line 285 of file isoSpec++.cpp.

double IsoSpec::Iso::getModeMass () const

Get the mass of the mode-configuration (if there are many modes, it is undefined which one will be selected).

Definition at line 277 of file isoSpec++.cpp.

double IsoSpec::Iso::getMonoisotopicPeakMass () const

Get the mass of the monoisotopic peak in the isotopic distribution. Monoisotopc molecule is defined as consisting only of the most frequent isotopes of each element. These are often (but not always) the lightest ones, making this often (but again, not always) equal to getLightestPeakMass()

Definition at line 261 of file isoSpec++.cpp.

double IsoSpec::Iso::getTheoreticalAverageMass () const

Get the theoretical average mass of the molecule.

Definition at line 293 of file isoSpec++.cpp.

double IsoSpec::Iso::getUnlikeliestPeakLProb () const

Get the logprobability of the least probable subisotopologue.

Definition at line 269 of file isoSpec++.cpp.

void IsoSpec::Iso::saveMarginalLogSizeEstimates (double * priorities, double target_total_prob) const

Save estimates of logarithms of target sizes of marginals using Gaussian approximation into argument array. Array priorities must have length equal to dimNumber.

Definition at line 335 of file isoSpec++.cpp.

double IsoSpec::Iso::stddev () const [inline]

Get the standard deviation of the theoretical distribution.

Definition at line 163 of file isoSpec++.h.

double IsoSpec::Iso::variance () const

Get the theoretical variance of the distribution.

Definition at line 301 of file isoSpec++.cpp.

Member Data Documentation

int IsoSpec::Iso::allDim [protected]

The total number of isotopes of elements present in a chemical formula, e.g. for H20 it is 2+3=5.

Definition at line 67 of file isoSpec++.h.

int* IsoSpec::Iso::atomCounts [protected]

A table with numbers of isotopes for each element.

Definition at line 65 of file isoSpec++.h.

unsigned int IsoSpec::Iso::confSize [protected]

The number of bytes needed to represent the counts of isotopes present in the extended chemical formula.

Definition at line 66 of file isoSpec++.h.

int IsoSpec::Iso::dimNumber [protected]

The number of elements in the chemical formula of the molecule.

Definition at line 63 of file isoSpec++.h.

int* IsoSpec::Iso::isotopeNumbers [protected]

A table with numbers of isotopes for each element.

Definition at line 64 of file isoSpec++.h.

Marginal** IsoSpec::Iso::marginals [protected]

The table of pointers to the distributions of individual subisotopologues.

Definition at line 68 of file isoSpec++.h.

Author

Generated automatically by Doxygen for IsoSpec from the source code.

Version 2.2.1 IsoSpec