OpenMS  2.4.0
Public Member Functions | Protected Attributes | List of all members
FineIsotopePatternGenerator Class Reference

Isotope pattern generator for fine isotope distributions. More...

#include <OpenMS/CHEMISTRY/ISOTOPEDISTRIBUTION/FineIsotopePatternGenerator.h>

Inheritance diagram for FineIsotopePatternGenerator:
IsotopePatternGenerator

Public Member Functions

 FineIsotopePatternGenerator ()=default
 Default Constructor. More...
 
 FineIsotopePatternGenerator (double stop_condition, bool absolute=false, bool use_total_prob=false)
 Constructor. More...
 
IsotopeDistribution run (const EmpiricalFormula &) const
 Creates an isotope distribution from an empirical sum formula. More...
 
void setThreshold (double stop_condition)
 Set probability stop condition. More...
 
double getThreshold ()
 Get probability stop condition. More...
 
void setAbsolute (bool absolute)
 Set whether threshold is absolute or relative probability. More...
 
bool getAbsolute ()
 Returns whether threshold is absolute or relative probability. More...
 
- Public Member Functions inherited from IsotopePatternGenerator
 IsotopePatternGenerator ()
 
 IsotopePatternGenerator (double probability_cutoff)
 
virtual ~IsotopePatternGenerator ()
 

Protected Attributes

double stop_condition_ = 0.01
 
bool absolute_ = false
 
bool use_total_prob_ = false
 
- Protected Attributes inherited from IsotopePatternGenerator
double min_prob_
 

Detailed Description

Isotope pattern generator for fine isotope distributions.

NOTE: This interface is DEPRECATED, and kept for backward compatibility only. Please use the classes defined in IsoSpecWrapper.h directly instead.

This algorithm generates theoretical pattern distributions for empirical formulas with high resolution. The output is a list of pairs containing isotope probabilities paired with the accurate m/z for the analyte isotopic composition.

For example, for a C100 molecule, you will get:

1200 : 0.338014274835587
1201.0033548352 : 0.368628561496735
1202.0067096704 : 0.198997721076012
1203.0100645056 : 0.0708935707807541

One important value to set is the threshold with tells the algorithm when to stop calculating isotopic peaks to calculate. Here, a threshold of 0.01 would mean that the algorithm either stops calculating when any new peak would be less than 0.01 in height (absolute) or when it would be less than 0.01 of the highest isotopic peak (relative). This is how the stop_condition parameter is interpreted when use_total_prob is set to false.

Another way to parametrise the search is to cover a certain portion of total probability, such as 0.99. This is what most users will want to use; see the documentation on IsoSpecTotalProbWrapper and IsoSpecThresholdWrapper for the details (also, you should use those classes directly for increased performance). This is how the stop_condition parameter is interpreted when use_total_prob is set to true.

Note
Although use_total_prob is set to false by default for backward compatibility, most users should set it to true and parametrise by total probability needed.
absolute parameter is ignored when use_total_prob is set to true
When use_total_prob is set to false, common sensible values of stop_condition will be close to 0.0 (like 0.01), when it's set to true - close to 1.0, like 0.99.
Computation of fine isotope patterns can be slow for large molecules, if you don't need fine isotope distributions consider using CoarseIsotopePatternGenerator.
Consider using IsoSpec directly for increased performance.

The computation is based on the IsoSpec algorithm

Łącki MK, Startek M, Valkenborg D, Gambin A.
IsoSpec: Hyperfast Fine Structure Calculator.
Anal Chem. 2017 Mar 21;89(6):3272-3277. doi: 10.1021/acs.analchem.6b01459.

See also method run()

Constructor & Destructor Documentation

◆ FineIsotopePatternGenerator() [1/2]

Default Constructor.

◆ FineIsotopePatternGenerator() [2/2]

FineIsotopePatternGenerator ( double  stop_condition,
bool  absolute = false,
bool  use_total_prob = false 
)
inline

Constructor.

Parameters
stop_conditionThe total probability (if use_total_prob == true) or threshold (if use_total_prob is false) (see class docu)
absoluteWhether threshold is absolute or relative (see class docu)
use_total_probWhether the stop_condition should be interpreted as a probability threshold (only configurations with intensity above this threshold will be returned) or as a total probability that the distribution should cover.

Member Function Documentation

◆ getAbsolute()

bool getAbsolute ( )
inline

Returns whether threshold is absolute or relative probability.

◆ getThreshold()

double getThreshold ( )
inline

Get probability stop condition.

◆ run()

IsotopeDistribution run ( const EmpiricalFormula ) const
virtual

Creates an isotope distribution from an empirical sum formula.

Iterates through all elements, convolves them according to the number of atoms from that element and sums up the result.

Note
The constructed isotope distribution is sorted by m/z which slows down processing, consider using IsoSpec directly for increased performance.

Implements IsotopePatternGenerator.

◆ setAbsolute()

void setAbsolute ( bool  absolute)
inline

Set whether threshold is absolute or relative probability.

◆ setThreshold()

void setThreshold ( double  stop_condition)
inline

Set probability stop condition.

Member Data Documentation

◆ absolute_

bool absolute_ = false
protected

◆ stop_condition_

double stop_condition_ = 0.01
protected

◆ use_total_prob_

bool use_total_prob_ = false
protected