OpenMS
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 (double min_mass, double max_mass, double delta, CoarseIsotopePatternGenerator &generator, bool use_RNA_averagine)
 constructor with parameters such as mass ranges and bin size. More...
 
 PrecalculatedAveragine (const PrecalculatedAveragine &)=default
 copy constructor More...
 
 PrecalculatedAveragine (PrecalculatedAveragine &&other) noexcept=default
 move constructor More...
 
PrecalculatedAveragineoperator= (const PrecalculatedAveragine &pc)=default
 copy assignment operator More...
 
PrecalculatedAveragineoperator= (PrecalculatedAveragine &&pc) noexcept=default
 move assignment operator More...
 
 ~PrecalculatedAveragine ()=default
 destructor More...
 
IsotopeDistribution get (double mass) const
 get distribution for input mass. If input mass exceeds the maximum mass (specified in constructor), output for the maximum mass More...
 
size_t getMaxIsotopeIndex () const
 get max isotope index More...
 
void setMaxIsotopeIndex (int index)
 set max isotope index More...
 
Size getLeftCountFromApex (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 (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 (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 (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 (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 (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 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/4]

default constructor

◆ PrecalculatedAveragine() [2/4]

PrecalculatedAveragine ( double  min_mass,
double  max_mass,
double  delta,
CoarseIsotopePatternGenerator generator,
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

◆ PrecalculatedAveragine() [3/4]

copy constructor

◆ PrecalculatedAveragine() [4/4]

PrecalculatedAveragine ( PrecalculatedAveragine &&  other)
defaultnoexcept

move constructor

◆ ~PrecalculatedAveragine()

~PrecalculatedAveragine ( )
default

destructor

Member Function Documentation

◆ get()

IsotopeDistribution get ( 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 ( 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 ( 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 ( double  mass) const

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

◆ getLeftCountFromApex()

Size getLeftCountFromApex ( 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()

size_t getMaxIsotopeIndex ( ) const

get max isotope index

◆ getMostAbundantMassDelta()

double getMostAbundantMassDelta ( 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 ( 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  mass) const
private

calculate the mass bin index from mass

◆ operator=() [1/2]

PrecalculatedAveragine& operator= ( const PrecalculatedAveragine pc)
default

copy assignment operator

◆ operator=() [2/2]

PrecalculatedAveragine& operator= ( PrecalculatedAveragine &&  pc)
defaultnoexcept

move assignment operator

◆ setMaxIsotopeIndex()

void setMaxIsotopeIndex ( 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.