OpenMS  3.0.0
FLASHDeconvHelperStructs::PrecalculatedAveragine Class Reference

Averagine patterns pre-calculated for speed up. Other variables are also calculated for fast cosine calculation. More...

#include <OpenMS/ANALYSIS/TOPDOWN/FLASHDeconvHelperStructs.h>

Collaboration diagram for FLASHDeconvHelperStructs::PrecalculatedAveragine:
[legend]

Public Member Functions

 PrecalculatedAveragine ()=default
 default constructor More...
 
 PrecalculatedAveragine (const double min_mass, const double max_mass, const double delta, CoarseIsotopePatternGenerator *generator, const bool use_RNA_averagine)
 constructor with parameters such as mass ranges and bin size. More...
 
IsotopeDistribution get (const double mass) const
 get distribution for input mass. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass More...
 
int getMaxIsotopeIndex () const
 get max isotope index More...
 
void setMaxIsotopeIndex (const int index)
 set max isotope index More...
 
Size getLeftCountFromApex (const double mass) const
 get isotope distance (from apex to the left direction) to consider. This is specified in the constructor. index. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass More...
 
Size getRightCountFromApex (const double mass) const
 get isotope distance (from apex to the rigth direction) to consider. This is specified in the constructor. index. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass More...
 
Size getApexIndex (const double mass) const
 get index of most abundant isotope. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass More...
 
Size getLastIndex (const double mass) const
 get index of last isotope. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass More...
 
double getAverageMassDelta (const double mass) const
 get mass difference between avg and mono masses. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass More...
 
double getMostAbundantMassDelta (const double mass) const
 get mass difference between most abundant mass and mono masses. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass More...
 

Private Member Functions

Size massToIndex_ (double const mass) const
 calculate the mass bin index from mass More...
 

Private Attributes

std::vector< IsotopeDistributionisotopes_
 isotope distributions for different (binned) masses More...
 
std::vector< double > norms_
 L2 norms_ for masses. More...
 
std::vector< double > average_mono_mass_difference_
 mass differences between average mass and monoisotopic mass More...
 
std::vector< double > abundant_mono_mass_difference_
 mass differences between most abundant mass and monoisotopic mass More...
 
std::vector< int > left_count_from_apex_
 Isotope start indices: isotopes of the indices less than them have very low intensities. More...
 
std::vector< int > right_count_from_apex_
 Isotope end indices: isotopes of the indices larger than them have very low intensities. More...
 
std::vector< Sizeapex_index_
 most abundant isotope index More...
 
Size max_isotope_index_
 max isotope index More...
 
double mass_interval_
 mass interval for calculation More...
 
double min_mass_
 min mass for calculation More...
 

Detailed Description

Averagine patterns pre-calculated for speed up. Other variables are also calculated for fast cosine calculation.

Constructor & Destructor Documentation

◆ PrecalculatedAveragine() [1/2]

default constructor

◆ PrecalculatedAveragine() [2/2]

PrecalculatedAveragine ( const double  min_mass,
const double  max_mass,
const double  delta,
CoarseIsotopePatternGenerator generator,
const bool  use_RNA_averagine 
)

constructor with parameters such as mass ranges and bin size.

Parameters
min_massthe averagine distributions will be calculated from this min_mass
max_massto the max_mass
deltawith the bin size delta
generatorthis generates (calculates) the distributions
use_RNA_averagineif set, nucleotide-based isotope patters are calculated

Member Function Documentation

◆ get()

IsotopeDistribution get ( const double  mass) const

get distribution for input mass. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass

◆ getApexIndex()

Size getApexIndex ( const double  mass) const

get index of most abundant isotope. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass

◆ getAverageMassDelta()

double getAverageMassDelta ( const double  mass) const

get mass difference between avg and mono masses. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass

◆ getLastIndex()

Size getLastIndex ( const double  mass) const

get index of last isotope. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass

Referenced by TOPPFLASHDeconv::main_().

◆ getLeftCountFromApex()

Size getLeftCountFromApex ( const double  mass) const

get isotope distance (from apex to the left direction) to consider. This is specified in the constructor. index. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass

◆ getMaxIsotopeIndex()

int getMaxIsotopeIndex ( ) const

get max isotope index

◆ getMostAbundantMassDelta()

double getMostAbundantMassDelta ( const double  mass) const

get mass difference between most abundant mass and mono masses. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass

◆ getRightCountFromApex()

Size getRightCountFromApex ( const double  mass) const

get isotope distance (from apex to the rigth direction) to consider. This is specified in the constructor. index. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass

◆ massToIndex_()

Size massToIndex_ ( double const  mass) const
private

calculate the mass bin index from mass

◆ setMaxIsotopeIndex()

void setMaxIsotopeIndex ( const int  index)

set max isotope index

Member Data Documentation

◆ abundant_mono_mass_difference_

std::vector<double> abundant_mono_mass_difference_
private

mass differences between most abundant mass and monoisotopic mass

◆ apex_index_

std::vector<Size> apex_index_
private

most abundant isotope index

◆ average_mono_mass_difference_

std::vector<double> average_mono_mass_difference_
private

mass differences between average mass and monoisotopic mass

◆ isotopes_

std::vector<IsotopeDistribution> isotopes_
private

isotope distributions for different (binned) masses

◆ left_count_from_apex_

std::vector<int> left_count_from_apex_
private

Isotope start indices: isotopes of the indices less than them have very low intensities.

◆ mass_interval_

double mass_interval_
private

mass interval for calculation

◆ max_isotope_index_

Size max_isotope_index_
private

max isotope index

◆ min_mass_

double min_mass_
private

min mass for calculation

◆ norms_

std::vector<double> norms_
private

L2 norms_ for masses.

◆ right_count_from_apex_

std::vector<int> right_count_from_apex_
private

Isotope end indices: isotopes of the indices larger than them have very low intensities.