logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Author

       Generated automatically by Doxygen for IsoSpec from the source code.

IsoSpec                                           Version 2.2.1                                       IsoSpec(3)

Detailed Description

       Copyright (C) 2015-2020 Mateusz Łącki and Michał Startek.

       This file is part of IsoSpec.

       IsoSpec is free software: you can redistribute it and/or modify it under the terms of the Simplified
       ('2-clause') BSD licence.

       IsoSpec is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
       implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

       You should have received a copy of the Simplified BSD Licence along with IsoSpec. If not, see
       https://opensource.org/licenses/BSD-2-Clause.

Function Documentation

double*IsoSpec::alloc_lfact_table()
       Definition at line 32 of file isoMath.cpp.

   IntTypeIsoSpec::boost_binomial_distribution_variate(IntTypet_arg,RealTypep_arg,std::mt19937&urng=random_gen)
       Definition at line 189 of file btrd.h.

   IntTypeIsoSpec::btrd(IntType_t,RealTypep,IntTypem,std::mt19937&urng=random_gen)
       Definition at line 77 of file btrd.h.

   doubleIsoSpec::calc_mass(constint*conf,constdouble*masses,intdim)[inline]
       Definition at line 71 of file misc.h.

   doubleIsoSpec::combinedSum(constint*conf,constpod_vector<double>**valuesContainer,intdimNumber)[inline]
       Definition at line 38 of file misc.h.

   doubleIsoSpec::combinedSum(constint*conf,conststd::vector<double>**valuesContainer,intdimNumber)[inline]
       Definition at line 29 of file misc.h.

   template<typenameT>voidIsoSpec::copyConf(constT*source,T*destination,intdim)[inline]
       Definition at line 26 of file allocator.h.

   template<typenameT>voidIsoSpec::dealloc_table(T*tbl,intdim)
       Definition at line 133 of file misc.h.

   template<typenameT>size_t*IsoSpec::get_inverse_order(T*order_array,size_tN)
       Definition at line 162 of file misc.h.

   doubleIsoSpec::get_loggamma_nominator(intx)
       Definition at line 149 of file marginalTrek++.cpp.

   template<typenameT>size_t*IsoSpec::get_order(T*order_array,size_tN)
       Definition at line 151 of file misc.h.

   int*IsoSpec::getConf(void*conf)[inline]
       Definition at line 47 of file misc.h.

   doubleIsoSpec::getLProb(void*conf)[inline]
       Definition at line 54 of file misc.h.

   double*IsoSpec::getMLogProbs(constdouble*probs,intisoNo)
       Here we order the processor to round the numbers up rather than down. Rounding down could result in the
       algorithm falling in an infinite loop because of the numerical instability of summing.

       Definition at line 122 of file marginalTrek++.cpp.

   template<typenameTA,typenameTB>voidIsoSpec::impose_order(size_t*O,size_tN,TA*A,TB*B)
       Definition at line 173 of file misc.h.

   doubleIsoSpec::InverseChiSquareCDF2(intk,doublex)[inline]
       Definition at line 68 of file isoMath.h.

   doubleIsoSpec::InverseLowerIncompleteGamma2(inta,doublex)
       Definition at line 131 of file isoMath.cpp.

   IntTypeIsoSpec::invert(IntTypet,RealTypep,std::mt19937&urng=random_gen)
       Definition at line 160 of file btrd.h.

   doubleIsoSpec::LowerIncompleteGamma2(inta,doublex)
       Definition at line 104 of file isoMath.cpp.

   doubleIsoSpec::NormalCDF(doublex,doublemean,doublestdev)
       Definition at line 70 of file isoMath.cpp.

   doubleIsoSpec::NormalCDFInverse(doublep)
       Definition at line 57 of file isoMath.cpp.

   doubleIsoSpec::NormalCDFInverse(doublep,doublemean,doublestdev)
       Definition at line 65 of file isoMath.cpp.

   doubleIsoSpec::NormalPDF(doublex,doublemean,doublestdev)
       Definition at line 95 of file isoMath.cpp.

   voidIsoSpec::parse_fasta(constchar*fasta,intatomCounts[6])[inline]
       Definition at line 33 of file fasta.h.

   unsignedintIsoSpec::parse_formula(constchar*formula,std::vector<double>&isotope_masses,std::vector<double>&isotope_probabilities,int**isotopeNumbers,int**atomCounts,unsignedint*confSize,booluse_nominal_masses)
       Definition at line 355 of file isoSpec++.cpp.

   template<typenameT>voidIsoSpec::printArray(constT*array,intsize,constchar*prefix='')
       Definition at line 85 of file misc.h.

   template<typenameT>voidIsoSpec::printNestedArray(constT**array,constint*shape,intsize)
       Definition at line 108 of file misc.h.

   template<typenameT>voidIsoSpec::printOffsets(constT**array,intsize,constT*offset,constchar*prefix='')
       Definition at line 99 of file misc.h.

   template<typenameT>voidIsoSpec::printVector(conststd::vector<T>&vec)
       Definition at line 94 of file misc.h.

   void*IsoSpec::quickselect(void**array,intn,intstart,intend)
       Definition at line 28 of file misc.cpp.

   doubleIsoSpec::RationalApproximation(doublet)
       Definition at line 47 of file isoMath.cpp.

   doubleIsoSpec::rdvariate_beta_1_b(doubleb,std::mt19937&rgen=random_gen)[inline]
       Definition at line 76 of file isoMath.h.

   size_tIsoSpec::rdvariate_binom(size_ttries,doublesucc_prob,std::mt19937&rgen)
       Definition at line 153 of file isoMath.cpp.

   template<typenameT>voidIsoSpec::realloc_append(T**array,Twhat,size_told_array_size)
       Definition at line 142 of file misc.h.

   voidIsoSpec::release_g_lfact_table()
       Definition at line 23 of file isoMath.cpp.

   template<typenameT>voidIsoSpec::reorder_array(T*arr,size_t*order,size_tsize,boolcan_destroy=false)
       Definition at line 134 of file fixedEnvelopes.cpp.

   doubleIsoSpec::unnormalized_logProb(constint*conf,constdouble*logProbs,intdim)[inline]
       Definition at line 61 of file misc.h.

   intIsoSpec::verify_atom_cnt(intatomCnt)
       Definition at line 156 of file marginalTrek++.cpp.

   voidIsoSpec::writeInitialConfiguration(constintatomCnt,constintisotopeNo,constdouble*lprobs,int*res)
       Find one of the most probable subisotopologues. The algorithm uses the hill-climbing algorithm. It starts
       from a subisotopologue close to the mean of the underlying multinomial distribution. There might be more
       than one modes, in case of which this function will return only one of them, close to the mean.

       ParametersatomCnt

       Here we perform hill climbing to the mode of the marginal distribution (the subisotopologue
       distribution). We start from the point close to the mean of the underlying multinomial distribution.

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

Name

       IsoSpec

Synopsis

Classes
       class Allocator
       class ConfEqual
       class ConfOrder
       class ConfOrderMarginal
       class ConfOrderMarginalDescending
       class DirtyAllocator
       class FixedEnvelope
       class Iso
           The Iso class for the calculation of the isotopic distribution.
       class IsoGenerator
           The generator of isotopologues.
       class IsoLayeredGenerator
       class IsoOrderedGenerator
           The generator of isotopologues sorted by their probability of occurrence.
       class IsoStochasticGenerator
       class IsoThresholdGenerator
           The generator of isotopologues above a given threshold value.
       class KeyHasher
       class LayeredMarginalLayeredMarginal class.
       class Marginal
           The marginal distribution class (a subisotopologue).
       class MarginalTrek
           The marginal distribution class (a subisotopologue).
       class OrderMarginalsBySizeDecresing
       class PrecalculatedMarginal
           Precalculated Marginal class.
       struct ProbAndConfPtr
       class ReverseOrder
       class SSummator
       class Summator
       class TableOrder
       class TSummatorTypedefs
       typedef double RealType
       typedef int64_t IntType
       typedef int * ConfFunctions
       template<typename T > void copyConf (const T *source, T *destination, int dim)
       IntType btrd (IntType _t, RealType p, IntType m, std::mt19937 &urng=random_gen)
       IntType invert (IntType t, RealType p, std::mt19937 &urng=random_gen)
       IntType boost_binomial_distribution_variate (IntType t_arg, RealType p_arg, std::mt19937
           &urng=random_gen)
       void parse_fasta (const char *fasta, int atomCounts[6])
       template<typename T > void reorder_array (T *arr, size_t *order, size_t size, bool can_destroy=false)
       double AbyssalWassersteinDistanceGrad (FixedEnvelope *const *envelopes, const double *scales, double
           *ret_gradient, size_t N, double abyss_depth_exp, double abyss_depth_the)
       void release_g_lfact_table ()
       double * alloc_lfact_table ()
       double RationalApproximation (double t)
       double NormalCDFInverse (double p)
       double NormalCDFInverse (double p, double mean, double stdev)
       double NormalCDF (double x, double mean, double stdev)
       double NormalPDF (double x, double mean, double stdev)
       double LowerIncompleteGamma2 (int a, double x)
       double InverseLowerIncompleteGamma2 (int a, double x)
       std::mt19937 random_gen (random_dev())
       std::uniform_real_distribution< double > stdunif (0.0, 1.0)
       size_t rdvariate_binom (size_t tries, double succ_prob, std::mt19937 &rgen)
       double InverseChiSquareCDF2 (int k, double x)
       double rdvariate_beta_1_b (double b, std::mt19937 &rgen=random_gen)
       unsigned int parse_formula (const char *formula, std::vector< double > &isotope_masses, std::vector<
           double > &isotope_probabilities, int **isotopeNumbers, int **atomCounts, unsigned int *confSize, bool
           use_nominal_masses)
       void writeInitialConfiguration (const int atomCnt, const int isotopeNo, const double *lprobs, int *res)
           Find one of the most probable subisotopologues.
       double * getMLogProbs (const double *probs, int isoNo)
       double get_loggamma_nominator (int x)
       int verify_atom_cnt (int atomCnt)
       void * quickselect (void **array, int n, int start, int end)
       double combinedSum (const int *conf, const std::vector< double > **valuesContainer, int dimNumber)
       double combinedSum (const int *conf, const pod_vector< double > **valuesContainer, int dimNumber)
       int * getConf (void *conf)
       double getLProb (void *conf)
       double unnormalized_logProb (const int *conf, const double *logProbs, int dim)
       double calc_mass (const int *conf, const double *masses, int dim)
       template<typename T > void printArray (const T *array, int size, const char *prefix='')
       template<typename T > void printVector (const std::vector< T > &vec)
       template<typename T > void printOffsets (const T **array, int size, const T *offset, const char
           *prefix='')
       template<typename T > void printNestedArray (const T **array, const int *shape, int size)
       void * quickselect (const void **array, int n, int start, int end)
           Quickly select the n'th positional statistic, including the weights.
       template<typename T > void dealloc_table (T *tbl, int dim)
       template<typename T > void realloc_append (T **array, T what, size_t old_array_size)
       template<typename T > size_t * get_order (T *order_array, size_t N)
       template<typename T > size_t * get_inverse_order (T *order_array, size_t N)
       template<typename TA , typename TB > void impose_order (size_t *O, size_t N, TA *A, TB *B)

   Variables
       const size_t isospec_number_of_isotopic_entries = ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES
       const int elem_table_ID [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
       const int elem_table_atomicNo [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
       const double elem_table_mass [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
       const double elem_table_massNo [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
       const int elem_table_extraNeutrons [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
       const char * elem_table_element [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
       const char * elem_table_symbol [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
       const bool elem_table_Radioactive [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
       const double elem_table_probability [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
       const double elem_table_log_probability [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
       const int aa_isotope_numbers [6] = {2, 2, 2, 3, 4, 6}
       const double aa_elem_masses [19]
       const double aa_elem_nominal_masses [19]
       const double aa_elem_probabilities [19]
       const int aa_symbol_to_elem_counts [256 *6]
       double * g_lfact_table = alloc_lfact_table()
       const double sqrt_pi = 1.772453850905516027298167483341145182798
       std::random_device random_dev
       const double pi = 3.14159265358979323846264338328
       const double logpi =
           1.144729885849400174143427351353058711647294812915311571513623071472137769884826079783623270275489708
       std::mt19937 random_gen
       std::uniform_real_distribution< double > stdunif

Typedef Documentation

typedefint*IsoSpec::Conf
       Definition at line 22 of file conf.h.

   typedefint64_tIsoSpec::IntType
       Definition at line 28 of file btrd.h.

   typedefdoubleIsoSpec::RealType
       Definition at line 27 of file btrd.h.

Variable Documentation

constdoubleIsoSpec::aa_elem_massesInitialvalue:.PP
       = {
           elem_table_mass[9], elem_table_mass[10],
           elem_table_mass[0], elem_table_mass[1],
           elem_table_mass[11], elem_table_mass[12],
           elem_table_mass[13], elem_table_mass[14], elem_table_mass[15],
           elem_table_mass[29], elem_table_mass[30], elem_table_mass[31], elem_table_mass[32],
           elem_table_mass[85], elem_table_mass[86], elem_table_mass[87], elem_table_mass[88], elem_table_mass[89], elem_table_mass[90]
       }

       Definition at line 27 of file fasta.cpp.

   constdoubleIsoSpec::aa_elem_nominal_massesInitialvalue:.PP
       = {
           elem_table_massNo[9], elem_table_massNo[10],
           elem_table_massNo[0], elem_table_massNo[1],
           elem_table_massNo[11], elem_table_massNo[12],
           elem_table_massNo[13], elem_table_massNo[14], elem_table_massNo[15],
           elem_table_massNo[29], elem_table_massNo[30], elem_table_massNo[31], elem_table_massNo[32],
           elem_table_massNo[85], elem_table_massNo[86], elem_table_massNo[87], elem_table_massNo[88], elem_table_massNo[89], elem_table_massNo[90]
       }

       Definition at line 37 of file fasta.cpp.

   constdoubleIsoSpec::aa_elem_probabilitiesInitialvalue:.PP
       = {
           elem_table_probability[9], elem_table_probability[10],
           elem_table_probability[0], elem_table_probability[1],
           elem_table_probability[11], elem_table_probability[12],
           elem_table_probability[13], elem_table_probability[14], elem_table_probability[15],
           elem_table_probability[29], elem_table_probability[30], elem_table_probability[31], elem_table_probability[32],
           elem_table_probability[85], elem_table_probability[86], elem_table_probability[87], elem_table_probability[88], elem_table_probability[89], elem_table_probability[90]
       }

       Definition at line 47 of file fasta.cpp.

   constintIsoSpec::aa_isotope_numbers={2,2,2,3,4,6}
       Definition at line 25 of file fasta.cpp.

   constintIsoSpec::aa_symbol_to_elem_counts
       Definition at line 57 of file fasta.cpp.

   ISOSPEC_C_APIconstintIsoSpec::elem_table_atomicNo
       Definition at line 325 of file element_tables.cpp.

   ISOSPEC_C_APIconstchar*IsoSpec::elem_table_element
       Definition at line 1509 of file element_tables.cpp.

   ISOSPEC_C_APIconstintIsoSpec::elem_table_extraNeutrons
       Definition at line 1213 of file element_tables.cpp.

   ISOSPEC_C_APIconstintIsoSpec::elem_table_ID
       Definition at line 28 of file element_tables.cpp.

   ISOSPEC_C_APIconstdoubleIsoSpec::elem_table_log_probability
       Definition at line 2693 of file element_tables.cpp.

   ISOSPEC_C_APIconstdoubleIsoSpec::elem_table_mass
       Definition at line 621 of file element_tables.cpp.

   ISOSPEC_C_APIconstdoubleIsoSpec::elem_table_massNo
       Definition at line 917 of file element_tables.cpp.

   ISOSPEC_C_APIconstdoubleIsoSpec::elem_table_probability
       Definition at line 2397 of file element_tables.cpp.

   ISOSPEC_C_APIconstboolIsoSpec::elem_table_Radioactive
       Definition at line 2101 of file element_tables.cpp.

   ISOSPEC_C_APIconstchar*IsoSpec::elem_table_symbol
       Definition at line 1805 of file element_tables.cpp.

   double*IsoSpec::g_lfact_table=alloc_lfact_table()
       Definition at line 44 of file isoMath.cpp.

   ISOSPEC_C_APIconstsize_tIsoSpec::isospec_number_of_isotopic_entries=ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES
       Definition at line 26 of file element_tables.cpp.

   constdoubleIsoSpec::logpi=1.144729885849400174143427351353058711647294812915311571513623071472137769884826079783623270275489708
       Definition at line 54 of file isoMath.h.

   constdoubleIsoSpec::pi=3.14159265358979323846264338328
       Definition at line 53 of file isoMath.h.

   std::random_deviceIsoSpec::random_dev
       Definition at line 149 of file isoMath.cpp.

   constdoubleIsoSpec::sqrt_pi=1.772453850905516027298167483341145182798
       Definition at line 102 of file isoMath.cpp.

See Also