| OpenMS 2.5.0

Classes | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
IsotopeWavelet Class Reference

Implements the isotope wavelet function. More...

`#include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/IsotopeWavelet.h>`

## Classes

union | fi_
| Internal union for fast computation of the power function. More...

## Static Public Member Functions

static IsotopeWavelet * | init (const double max_m, const UInt max_charge)
static IsotopeWavelet * | getInstance ()
static void | destroy ()
static double | getValueByMass (const double t, const double m, const UInt z, const Int mode=+1)
| Returns the value of the isotope wavelet at position `t`. Usually, you do not need to call this function. Please use. More...
static double | getValueByLambda (const double lambda, const double tz1)
| Returns the value of the isotope wavelet at position `t` via a fast table lookup. Usually, you do not need to call this function. Please use. More...
static double | getValueByLambdaExtrapol (const double lambda, const double tz1)
| Returns the value of the isotope wavelet at position `t`. This function is usually significantly slower than the table lookup performed in. More...
static double | getValueByLambdaExact (const double lambda, const double tz1)
static UInt | getMaxCharge ()
| Returns the largest charge state we will consider. More...
static void | setMaxCharge (const UInt max_charge)
| Sets the `max_charge` parameter. More...
static double | getTableSteps ()
| Returns the table_steps_ parameter. More...
static double | getInvTableSteps ()
| Returns the inv_table_steps_ parameter. More...
static void | setTableSteps (const double table_steps)
| Sets the `table_steps` parameter. More...
static double | getLambdaL (const double m)
| Returns the mass-parameter lambda (linear fit). More...
static const IsotopeDistribution::ContainerType & | getAveragine (const double m, UInt *size=nullptr)
| Computes the averagine isotopic distribution we would expect at the de-convoluted mass. More...
static Size | getGammaTableMaxIndex ()
| Returns the largest possible index for the pre-sampled gamma table. More...
static Size | getExpTableMaxIndex ()
| Returns the largest possible index for the pre-sampled exp table. More...
static float | myPow (float a, float b)
| Internally used function; uses register shifts for fast computation of the power function. More...
static UInt | getMzPeakCutOffAtMonoPos (const double mass, const UInt z)
static UInt | getNumPeakCutOff (const double mass, const UInt z)
static UInt | getNumPeakCutOff (const double mz)

## Protected Member Functions

| IsotopeWavelet ()
| Default Constructor. More...
| IsotopeWavelet (const double max_m, const UInt max_charge)
| Constructor. More...
virtual | ~IsotopeWavelet ()
| Destructor. More...

## Static Protected Member Functions

static void | preComputeExpensiveFunctions_ (const double max_m)
| Should be called once before values are drawn from the isotope wavelet function. The function is automatically called by the public constructor. More...
static void | computeIsotopeDistributionSize_ (const double max_m)
| Initializes the internally used averagine model; automatically called by the public constructor. More...
static float | myPow2_ (float i)
| Internally used function; uses register shifts for fast computation of the power function. The function follows http://www.dctsystems.co.uk/Software/power.html , code by Ian Stephenson, DCT Systems, NCCA Bournemouth University. More...
static float | myLog2_ (float i)
| Internally used function uses register shifts for fast computation of the power function. The function follows http://www.dctsystems.co.uk/Software/power.html , code by Ian Stephenson, DCT Systems, NCCA Bournemouth University. More...

## Static Protected Attributes

static IsotopeWavelet * | me_
static UInt | max_charge_
static double | table_steps_
static double | inv_table_steps_
static std::vector< double > | gamma_table_
static std::vector< double > | gamma_table_new_
static std::vector< double > | exp_table_
static std::vector< double > | sine_table_
static CoarseIsotopePatternGenerator | solver_
static IsotopeDistribution | averagine_
static Size | gamma_table_max_index_
static Size | exp_table_max_index_

## Detailed Description

Implements the isotope wavelet function.

The IsotopeWavelet class implements the isotope wavelet as described by R. Hussong, A. Tholey, A. Hildebrandt: Efficient Analysis of Mass Spectrometry Data Using the Isotope Wavelet. Proceedings of the 3rd international Symposium in Computational Life Sciences (Complife07). American Institute of Physics (AIP) Proceedings (2007).

Note
  This class features a singleton design pattern.

## Class Documentation

## ◆ OpenMS::IsotopeWavelet::fi_

union OpenMS::IsotopeWavelet::fi_

Internal union for fast computation of the power function.

Class Members
float | f |
Int | i |

## Constructor & Destructor Documentation

## ◆ IsotopeWavelet() [1/2]

IsotopeWavelet | ( |  | ) |

protected

Default Constructor.

## ◆ IsotopeWavelet() [2/2]

IsotopeWavelet | ( | const double | max_m,
|  | const UInt | max_charge
| ) |  |

protected

Constructor.

Parameters

  max_m | The maximal de-convoluted mass that occurs in the current data set.
  max_charge | The maximal charge state we would like to analyze.

## ◆ ~IsotopeWavelet()

virtual ~IsotopeWavelet | ( |  | ) |

protected virtual

Destructor.

## Member Function Documentation

## ◆ computeIsotopeDistributionSize_()

static void computeIsotopeDistributionSize_ | ( | const double | max_m | ) |

static protected

Initializes the internally used averagine model; automatically called by the public constructor.

Parameters

  max_m | The maximal de-convoluted mass that occurs in the current data set.

## ◆ destroy()

static void destroy | ( |  | ) |

static

Deletes the singleton instance.

## ◆ getAveragine()

static const IsotopeDistribution::ContainerType& getAveragine | ( | const double | m,
|  | UInt * | size = `nullptr`
| ) |  |

static

Computes the averagine isotopic distribution we would expect at the de-convoluted mass.

Parameters

  m | The de-convoluted mass m.
  size | Returns the number of significant peaks within a pattern occurring at mass `m`.

Returns
  The isotopic distribution.

## ◆ getExpTableMaxIndex()

static Size getExpTableMaxIndex | ( |  | ) |

inline static

Returns the largest possible index for the pre-sampled exp table.

## ◆ getGammaTableMaxIndex()

static Size getGammaTableMaxIndex | ( |  | ) |

inline static

Returns the largest possible index for the pre-sampled gamma table.

## ◆ getInstance()

static IsotopeWavelet* getInstance | ( |  | ) |

inline static

Returns an pointer to the current instance of the class.

## ◆ getInvTableSteps()

static double getInvTableSteps | ( |  | ) |

inline static

Returns the inv_table_steps_ parameter.

This is an internally used parameter controlling the precision of several pre-sampling steps. Normally, this parameter can be left unchanged.

## ◆ getLambdaL()

static double getLambdaL | ( | const double | m | ) |

static

Returns the mass-parameter lambda (linear fit).

Referenced by IsotopeWaveletTransform< PeakType >::getTransform(), IsotopeWaveletTransform< PeakType >::getTransformHighRes(), and IsotopeWaveletTransform< PeakType >::mapSeeds2Features().

## ◆ getMaxCharge()

static UInt getMaxCharge | ( |  | ) |

inline static

Returns the largest charge state we will consider.

## ◆ getMzPeakCutOffAtMonoPos()

static UInt getMzPeakCutOffAtMonoPos | ( | const double | mass,
|  | const UInt | z
| ) |  |

static

Referenced by IsotopeWaveletTransform< PeakType >::checkPositionForPlausibility_(), IsotopeWaveletTransform< PeakType >::getTransform(), IsotopeWaveletTransform< PeakType >::getTransformHighRes(), IsotopeWaveletTransform< PeakType >::identifyCharge(), IsotopeWaveletTransform< PeakType >::initializeScan(), IsotopeWaveletTransform< PeakType >::IsotopeWaveletTransform(), and IsotopeWaveletTransform< PeakType >::mapSeeds2Features().

## ◆ getNumPeakCutOff() [1/2]

static UInt getNumPeakCutOff | ( | const double | mass,
|  | const UInt | z
| ) |  |

static

Referenced by IsotopeWaveletTransform< PeakType >::checkPositionForPlausibility_(), IsotopeWaveletTransform< PeakType >::identifyCharge(), and IsotopeWaveletTransform< PeakType >::IsotopeWaveletTransform().

## ◆ getNumPeakCutOff() [2/2]

static UInt getNumPeakCutOff | ( | const double | mz | ) |

static

## ◆ getTableSteps()

static double getTableSteps | ( |  | ) |

inline static

Returns the table_steps_ parameter.

This is an internally used parameter controlling the precision of several pre-sampling steps. Normally, this parameter can be left unchanged.

## ◆ getValueByLambda()

static double getValueByLambda | ( | const double | lambda,
|  | const double | tz1
| ) |  |

static

Returns the value of the isotope wavelet at position `t` via a fast table lookup. Usually, you do not need to call this function. Please use.

See also
  sampleTheWavelet instead.

Note that this functions returns the pure function value of psi and not the normalized (average=0) value given by Psi.

Parameters

  lambda | The mass-parameter lambda.
  tz1 | t (the position) times the charge (z) plus 1.

Referenced by IsotopeWaveletTransform< PeakType >::getTransform(), and IsotopeWaveletTransform< PeakType >::getTransformHighRes().

## ◆ getValueByLambdaExact()

static double getValueByLambdaExact | ( | const double | lambda,
|  | const double | tz1
| ) |  |

static

## ◆ getValueByLambdaExtrapol()

static double getValueByLambdaExtrapol | ( | const double | lambda,
|  | const double | tz1
| ) |  |

static

Returns the value of the isotope wavelet at position `t`. This function is usually significantly slower than the table lookup performed in.

See also
  getValueByLambda. Nevertheless, it might be necessary to call this function due to extrapolating reasons caused by the alignment of the wavelet.

Usually, you do not need to call this function. Please use

See also
  sampleTheWavelet instead.

Note that this functions returns the pure function value of psi and not the normalized (average=0) value given by Psi.

Parameters

  lambda | The mass-parameter lambda.
  tz1 | t (the position) times the charge (z) plus 1.

## ◆ getValueByMass()

static double getValueByMass | ( | const double | t,
|  | const double | m,
|  | const UInt | z,
|  | const Int | mode = `+1`
| ) |  |

inline static

Returns the value of the isotope wavelet at position `t`. Usually, you do not need to call this function. Please use.

See also
  sampleTheWavelet instead.

Note that this functions returns the pure function value of psi and not the normalized (average=0) value given by Psi.

Parameters

  t | The position at which the wavelet has to be drawn (within the coordinate system of the wavelet).
  m | The m/z position within the signal (i.e. the mass not de-charged) within the signal.
  z | The charge `z` we want to detect.
  mode | Indicates whether positive mode (+1) or negative mode (-1) has been used for ionization.

References OpenMS::Constants::IW_PROTON_MASS.

## ◆ init()

static IsotopeWavelet* init | ( | const double | max_m,
|  | const UInt | max_charge
| ) |  |

static

The init function; creates an instance of this singleton class.

Referenced by IsotopeWaveletTransform< PeakType >::IsotopeWaveletTransform().

## ◆ myLog2_()

static float myLog2_ | ( | float | i | ) |

static protected

Internally used function uses register shifts for fast computation of the power function. The function follows http://www.dctsystems.co.uk/Software/power.html , code by Ian Stephenson, DCT Systems, NCCA Bournemouth University.

Note
  Please, do not modify this function.

## ◆ myPow()

static float myPow | ( | float | a,
|  | float | b
| ) |  |

static

Internally used function; uses register shifts for fast computation of the power function.

Note
  Please, do not modify this function.

## ◆ myPow2_()

static float myPow2_ | ( | float | i | ) |

static protected

Internally used function; uses register shifts for fast computation of the power function. The function follows http://www.dctsystems.co.uk/Software/power.html , code by Ian Stephenson, DCT Systems, NCCA Bournemouth University.

Note
  Please, do not modify this function.

## ◆ preComputeExpensiveFunctions_()

static void preComputeExpensiveFunctions_ | ( | const double | max_m | ) |

static protected

Should be called once before values are drawn from the isotope wavelet function. The function is automatically called by the public constructor.

The function pre-computes the expensive gamma function. Parameters related to this function are:

See also
  max_charge_ and
  peak_cutoff_. If both of these are set correctly
  getValue will never compute the gamma function online.

Parameters

  max_m | The maximal de-convoluted mass that occurs in the current data set.

## ◆ setMaxCharge()

static void setMaxCharge | ( | const UInt | max_charge | ) |

inline static

Sets the `max_charge` parameter.

## ◆ setTableSteps()

static void setTableSteps | ( | const double | table_steps | ) |

inline static

Sets the `table_steps` parameter.

## Member Data Documentation

## ◆ averagine_

IsotopeDistribution averagine_

static protected

## ◆ exp_table_

std::vector<double> exp_table_

static protected

Internal table for the precomputed values of the exponential function.

## ◆ exp_table_max_index_

Size exp_table_max_index_

static protected

## ◆ gamma_table_

std::vector<double> gamma_table_

static protected

Internal table for the precomputed values of the gamma function.

## ◆ gamma_table_max_index_

Size gamma_table_max_index_

static protected

## ◆ gamma_table_new_

std::vector<double> gamma_table_new_

static protected

## ◆ inv_table_steps_

double inv_table_steps_

static protected

## ◆ max_charge_

UInt max_charge_

static protected

This parameter determines the maximal charge state we will consider.

## ◆ me_

IsotopeWavelet* me_

static protected

The singleton pointer.

## ◆ sine_table_

std::vector<double> sine_table_

static protected

Internal table for the precomputed values of the exponential function.

## ◆ solver_

CoarseIsotopePatternGenerator solver_

static protected

Internally used averagine model.

## ◆ table_steps_

double table_steps_

static protected

This parameter determines the sample rate for the pre-computation of the gamma function.