Man page - isospec_isothresholdgenerator(3)
Packages contains this manual
apt-get install libisospec++-dev
Manual
IsoSpec::IsoThresholdGenerator
NAMESYNOPSIS
Public Member Functions
Additional Inherited Members
Detailed Description
Constructor & Destructor Documentation
IsoSpec::IsoThresholdGenerator::IsoThresholdGenerator (Iso && iso, double_threshold, bool _absolute = true, int _tabSize = 1000, int _hashSize =1000, bool reorder_marginals = true)
IsoSpec::IsoThresholdGenerator::˜IsoThresholdGenerator ()
Member Function Documentation
ISOSPEC_FORCE_INLINE boolIsoSpec::IsoThresholdGenerator::advanceToNextConfiguration () [inline],[final], [override], [virtual]
size_t IsoSpec::IsoThresholdGenerator::count_confs ()
void IsoSpec::IsoThresholdGenerator::get_conf_signature (int * space) const[inline], [final], [override], [virtual]
ISOSPEC_FORCE_INLINE double IsoSpec::IsoThresholdGenerator::lprob () const[inline], [final], [override], [virtual]
ISOSPEC_FORCE_INLINE double IsoSpec::IsoThresholdGenerator::mass () const[inline], [final], [override], [virtual]
ISOSPEC_FORCE_INLINE double IsoSpec::IsoThresholdGenerator::prob () const[inline], [final], [override], [virtual]
void IsoSpec::IsoThresholdGenerator::reset ()
void IsoSpec::IsoThresholdGenerator::terminate_search ()
Author
NAME
IsoSpec::IsoThresholdGenerator - The generator of isotopologues above a given threshold value.
SYNOPSIS
#include <isoSpec++.h>
Inherits IsoSpec::IsoGenerator .
Public Member Functions
IsoThresholdGenerator
(const
IsoThresholdGenerator
&other)=delete
IsoThresholdGenerator
&
operator=
(const
IsoThresholdGenerator
&other)=delete
void
get_conf_signature
(int *space) const override
final
Write the signature of configuration into target memory
location. It must be large enough to accomodate it.
IsoThresholdGenerator
(
Iso
&&iso, double
_threshold, bool _absolute=true, int _tabSize=1000, int
_hashSize=1000, bool reorder_marginals=true)
The move-constructor.
ISOSPEC_FORCE_INLINE bool
advanceToNextConfiguration
() override final
Advance to the next, not yet visited, most probable
isotopologue.
ISOSPEC_FORCE_INLINE double
lprob
() const override
final
Get the log-probability of the current isotopologue.
ISOSPEC_FORCE_INLINE double
mass
() const override
final
Get the mass of the current isotopologue.
ISOSPEC_FORCE_INLINE double
prob
() const override
final
Get the probability of the current isotopologue.
void
terminate_search
()
Block the subsequent search of isotopologues.
void
reset
()
size_t
count_confs
()
Public Member Functions inherited from IsoSpec::IsoGenerator
IsoGenerator
(
Iso
&&iso, bool alloc_partials=true)
Move constructor.
virtual
˜IsoGenerator
()
Destructor.
Public Member Functions inherited from IsoSpec::Iso
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.
Additional Inherited Members
Static Public Member Functions inherited from IsoSpec::Iso
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.
Public Attributes inherited from IsoSpec::IsoGenerator
const double mode_lprob
Protected Member Functions inherited from IsoSpec::Iso
bool doMarginalsNeedSorting () const
Protected Attributes inherited from IsoSpec::IsoGenerator
double *
partialLProbs
double *
partialMasses
double *
partialProbs
Protected Attributes inherited from IsoSpec::Iso
int
dimNumber
int *
isotopeNumbers
int *
atomCounts
unsigned int
confSize
int
allDim
Marginal
**
marginals
Detailed Description
The generator of isotopologues above a given threshold value.
Attention: the calculated configurations are only partially ordeded and the user should not assume they will be ordered. This algorithm computes N isotopologues in O(N). It is a considerable advantage w.r.t. the IsoOrderedGenerator .
Definition at line 295 of file isoSpec++.h .
Constructor & Destructor Documentation
IsoSpec::IsoThresholdGenerator::IsoThresholdGenerator (Iso && iso, double_threshold, bool _absolute = true, int _tabSize = 1000, int _hashSize =1000, bool reorder_marginals = true)
The move-constructor.
Parameters
iso
An instance of the
Iso
class.
_threshold
The threshold value.
_absolute
If true, the _threshold is interpreted as the
absolute minimal peak height for the isotopologues. If
false, the _threshold is the fraction of the heighest
peak’s probability.
tabSize
The size of the extension of the table with
configurations.
hashSize
The size of the hash-table used to store
subisotopologues and check if they have been already
calculated.
Definition at line 478 of file isoSpec++.cpp .
IsoSpec::IsoThresholdGenerator::˜IsoThresholdGenerator ()
Definition at line 637 of file isoSpec++.cpp .
Member Function Documentation
ISOSPEC_FORCE_INLINE boolIsoSpec::IsoThresholdGenerator::advanceToNextConfiguration () [inline],[final], [override], [virtual]
Advance to the next, not yet visited, most probable isotopologue.
Returns
Return false if it is not possible to advance.
Implements IsoSpec::IsoGenerator .
Definition at line 352 of file isoSpec++.h .
size_t IsoSpec::IsoThresholdGenerator::count_confs ()
Count the number of configurations in the distribution. This can be used to pre-allocate enough memory to store it (e.g. std::vector’s reserve() method - this is faster than depending on the vector’s dynamic resizing, even though it means that the configuration space is walked through twice. This method has to be called before the first call to advanceToNextConfiguration and has undefined results (incl. segfaults) otherwise.
Definition at line 566 of file isoSpec++.cpp .
void IsoSpec::IsoThresholdGenerator::get_conf_signature (int * space) const[inline], [final], [override], [virtual]
Write the signature of configuration into target memory location. It must be large enough to accomodate it.
Implements IsoSpec::IsoGenerator .
Definition at line 315 of file isoSpec++.h .
ISOSPEC_FORCE_INLINE double IsoSpec::IsoThresholdGenerator::lprob () const[inline], [final], [override], [virtual]
Get the log-probability of the current isotopologue.
Returns
The log-probability of the current isotopologue.
Reimplemented from IsoSpec::IsoGenerator .
Definition at line 391 of file isoSpec++.h .
ISOSPEC_FORCE_INLINE double IsoSpec::IsoThresholdGenerator::mass () const[inline], [final], [override], [virtual]
Get the mass of the current isotopologue.
Returns
The mass of the current isotopologue.
Reimplemented from IsoSpec::IsoGenerator .
Definition at line 392 of file isoSpec++.h .
ISOSPEC_FORCE_INLINE double IsoSpec::IsoThresholdGenerator::prob () const[inline], [final], [override], [virtual]
Get the probability of the current isotopologue.
Returns
The probability of the current isotopologue.
Reimplemented from IsoSpec::IsoGenerator .
Definition at line 393 of file isoSpec++.h .
void IsoSpec::IsoThresholdGenerator::reset ()
Reset the generator to the beginning of the sequence. Allows it to be reused, eg. to go through the conf space once, calculate the amount of space needed to store configurations, then to allocate that memory, and go through it again, this time saving configurations (and is in fact faster than allocating a std::vector and depending on it to grow as needed. This is cheaper than throwing away the generator and making a new one too: marginal distributions don’t need to be recalculated.
Definition at line 620 of file isoSpec++.cpp .
void IsoSpec::IsoThresholdGenerator::terminate_search ()
Block the subsequent search of isotopologues.
Definition at line 555 of file isoSpec++.cpp .
Author
Generated automatically by Doxygen for IsoSpec from the source code.