| OpenMS 2.5.0

Private Member Functions | Private Attributes | List of all members
DIAScoring Class Reference

Scoring of an spectrum at the peak apex of an chromatographic elution peak. More...

`#include <OpenMS/ANALYSIS/OPENSWATH/DIAScoring.h>`

Inheritance diagram for DIAScoring:

## Public Member Functions

Constructors and Destructor
| DIAScoring ()
| Default constructor. More...
| ~DIAScoring () override
| Destructor. More...
DIA Scores
void | dia_isotope_scores (const std::vector< TransitionType > &transitions, SpectrumPtrType spectrum, OpenSwath::IMRMFeature *mrmfeature, double &isotope_corr, double &isotope_overlap)
| Isotope scores, see class description. More...
void | dia_massdiff_score (const std::vector< TransitionType > &transitions, SpectrumPtrType spectrum, const std::vector< double > &normalized_library_intensity, double &ppm_score, double &ppm_score_weighted, std::vector< double > &diff_ppm)
| Massdiff scores, see class description. More...
bool | dia_ms1_massdiff_score (double precursor_mz, SpectrumPtrType spectrum, double &ppm_score)
void | dia_ms1_isotope_scores (double precursor_mz, SpectrumPtrType spectrum, size_t charge_state, double &isotope_corr, double &isotope_overlap, const std::string &sum_formula="")
| Precursor isotope scores for precursors (peptides and metabolites) More...
void | dia_by_ion_score (SpectrumPtrType spectrum, AASequence &sequence, int charge, double &bseries_score, double &yseries_score)
| b/y ion scores More...
void | score_with_isotopes (SpectrumPtrType spectrum, const std::vector< TransitionType > &transitions, double &dotprod, double &manhattan)
| Dotproduct / Manhatten score with theoretical spectrum. More...
Public Member Functions inherited from DefaultParamHandler
| DefaultParamHandler (const String &name)
| Constructor with name that is displayed in error messages. More...
| DefaultParamHandler (const DefaultParamHandler &rhs)
| Copy constructor. More...
virtual | ~DefaultParamHandler ()
| Destructor. More...
virtual DefaultParamHandler & | operator= (const DefaultParamHandler &rhs)
| Assignment operator. More...
virtual bool | operator== (const DefaultParamHandler &rhs) const
| Equality operator. More...
void | setParameters (const Param &param)
| Sets the parameters. More...
const Param & | getParameters () const
| Non-mutable access to the parameters. More...
const Param & | getDefaults () const
| Non-mutable access to the default parameters. More...
const String & | getName () const
| Non-mutable access to the name. More...
void | setName (const String &name)
| Mutable access to the name. More...
const std::vector< String > & | getSubsections () const
| Non-mutable access to the registered subsections. More...

## Private Types

typedef OpenSwath::SpectrumPtr | SpectrumPtrType
| Type definitions. More...
typedef OpenSwath::LightTransition | TransitionType
| Transition interface (Transition, Peptide, Protein) More...

## Private Member Functions

| DIAScoring (const DIAScoring &rhs)
| Copy constructor (algorithm class) More...
DIAScoring & | operator= (const DIAScoring &rhs)
| Assignment operator (algorithm class) More...
void | updateMembers_ () override
| Synchronize members with param class. More...
void | diaIsotopeScoresSub_ (const std::vector< TransitionType > &transitions, SpectrumPtrType spectrum, std::map< std::string, double > &intensities, double &isotope_corr, double &isotope_overlap)
| Subfunction of dia_isotope_scores. More...
void | getFirstIsotopeRelativeIntensities_ (const std::vector< TransitionType > &transitions, OpenSwath::IMRMFeature *mrmfeature, std::map< std::string, double > &intensities)
void | largePeaksBeforeFirstIsotope_ (SpectrumPtrType spectrum, double mono_mz, double mono_int, int &nr_occurrences, double &max_ratio)
| Determine whether the current m/z value is a monoisotopic peak. More...
double | scoreIsotopePattern_ (double product_mz, const std::vector< double > &isotopes_int, int putative_fragment_charge, const std::string &sum_formula="")
| Compare an experimental isotope pattern to a theoretical one. More...

## Private Attributes

double | dia_extract_window_
double | dia_centroided_
double | dia_byseries_intensity_min_
double | dia_byseries_ppm_diff_
double | dia_nr_isotopes_
double | dia_nr_charges_
double | peak_before_mono_max_ppm_diff_
bool | dia_extraction_ppm_
TheoreticalSpectrumGenerator * | generator

## Additional Inherited Members

Protected Member Functions inherited from DefaultParamHandler
void | defaultsToParam_ ()
| Updates the parameters after the defaults have been set in the constructor. More...
Protected Attributes inherited from DefaultParamHandler
Param | param_
| Container for current parameters. More...
Param | defaults_
| Container for default parameters. This member should be filled in the constructor of derived classes! More...
std::vector< String > | subsections_
| Container for registered subsections. This member should be filled in the constructor of derived classes! More...
String | error_name_
| Name that is displayed in error messages during the parameter checking. More...
bool | check_defaults_
| If this member is set to false no checking if parameters in done;. More...
bool | warn_empty_defaults_
| If this member is set to false no warning is emitted when defaults are empty;. More...

## Detailed Description

Scoring of an spectrum at the peak apex of an chromatographic elution peak.

In DIA (data independent acquisition) / SWATH analysis, at each chromatographic point a full MS2 spectrum is recorded. This class allows to compute a number of scores based on the full MS2 spectrum available. The scores are the following:

- isotope scores: – isotope_corr: computes the correlation of each fragment ion with the theoretical isotope distribution. This is the pearson correlation to the theoretical isotope pattern weighted by the relative intensity of the transition (more is better). – isotope_overlap: checks whether a signal at position (mz - 1) / charge exists and how strong it is. This would be an indication that the current peak is an isotopic signal of another peak. This simply counts how often a peak was observed that is higher than the current peak, thus number is then weighted by the relative intensity of the transition (thus less is better here).
- massdiff score: computes the difference in ppm of the experimental signal to the expected signal (thus less is better)
- b/y ion score: checks for the presence of b/y ions of the peptide in question
- theoretical spectrum: a dotproduct and a manhattan score with a theoretical spectrum

This class expects spectra objects that implement the OpenSWATH Spectrum interface. Transitions are expected to be in the light transition format (defined in OPENSWATHALGO/DATAACCESS/TransitionExperiment.h).

Parameters of this class are:

Name | Type | Default | Restrictions | Description
--- | --- | --- | --- | ---
dia_extraction_window | float | 0.05 | min: 0.0 | DIA extraction window in Th or ppm.
dia_extraction_unit | string | Th | Th, ppm | DIA extraction window unit
dia_centroided | string | false | true, false | Use centroided DIA data.
dia_byseries_intensity_min | float | 300.0 | min: 0.0 | DIA b/y series minimum intensity to consider.
dia_byseries_ppm_diff | float | 10.0 | min: 0.0 | DIA b/y series minimal difference in ppm to consider.
dia_nr_isotopes | int | 4 | min: 0 | DIA number of isotopes to consider.
dia_nr_charges | int | 4 | min: 0 | DIA number of charges to consider.
peak_before_mono_max_ppm_diff | float | 20.0 | min: 0.0 | DIA maximal difference in ppm to count a peak at lower m/z when searching for evidence that a peak might not be monoisotopic.

Note:

- If a section name is documented, the documentation is displayed as tooltip.
- Advanced parameter names are italic.

## Member Typedef Documentation

## ◆ SpectrumPtrType

typedef OpenSwath::SpectrumPtr SpectrumPtrType

private

Type definitions.

Spectrum type, see Spectrum interface

## ◆ TransitionType

typedef OpenSwath::LightTransition TransitionType

private

Transition interface (Transition, Peptide, Protein)

## Constructor & Destructor Documentation

## ◆ DIAScoring() [1/2]

DIAScoring | ( |  | ) |

Default constructor.

## ◆ ~DIAScoring()

~DIAScoring | ( |  | ) |

override

Destructor.

## ◆ DIAScoring() [2/2]

DIAScoring | ( | const DIAScoring & | rhs | ) |

private

Copy constructor (algorithm class)

## Member Function Documentation

## ◆ dia_by_ion_score()

void dia_by_ion_score | ( | SpectrumPtrType | spectrum,
|  | AASequence & | sequence,
|  | int | charge,
|  | double & | bseries_score,
|  | double & | yseries_score
| ) |  |

b/y ion scores

## ◆ dia_isotope_scores()

void dia_isotope_scores | ( | const std::vector< TransitionType > & | transitions,
|  | SpectrumPtrType | spectrum,
|  | OpenSwath::IMRMFeature * | mrmfeature,
|  | double & | isotope_corr,
|  | double & | isotope_overlap
| ) |  |

Isotope scores, see class description.

## ◆ dia_massdiff_score()

void dia_massdiff_score | ( | const std::vector< TransitionType > & | transitions,
|  | SpectrumPtrType | spectrum,
|  | const std::vector< double > & | normalized_library_intensity,
|  | double & | ppm_score,
|  | double & | ppm_score_weighted,
|  | std::vector< double > & | diff_ppm
| ) |  |

Massdiff scores, see class description.

## ◆ dia_ms1_isotope_scores()

void dia_ms1_isotope_scores | ( | double | precursor_mz,
|  | SpectrumPtrType | spectrum,
|  | size_t | charge_state,
|  | double & | isotope_corr,
|  | double & | isotope_overlap,
|  | const std::string & | sum_formula = `""`
| ) |  |

Precursor isotope scores for precursors (peptides and metabolites)

## ◆ dia_ms1_massdiff_score()

bool dia_ms1_massdiff_score | ( | double | precursor_mz,
|  | SpectrumPtrType | spectrum,
|  | double & | ppm_score
| ) |  |

Precursor massdifference score

Parameters

  precursor_mz | Exact m/z of the precursor to be evaluated
  spectrum | MS1 spectrum to be evaluated
  ppm_score | Resulting score

Returns
  False if no signal was found (and no sensible score calculated), true otherwise

## ◆ diaIsotopeScoresSub_()

void diaIsotopeScoresSub_ | ( | const std::vector< TransitionType > & | transitions,
|  | SpectrumPtrType | spectrum,
|  | std::map< std::string, double > & | intensities,
|  | double & | isotope_corr,
|  | double & | isotope_overlap
| ) |  |

private

Subfunction of dia_isotope_scores.

## ◆ getFirstIsotopeRelativeIntensities_()

void getFirstIsotopeRelativeIntensities_ | ( | const std::vector< TransitionType > & | transitions,
|  | OpenSwath::IMRMFeature * | mrmfeature,
|  | std::map< std::string, double > & | intensities
| ) |  |

private

retrieves intensities from MRMFeature computes a vector of relative intensities for each feature (output to intensities)

## ◆ largePeaksBeforeFirstIsotope_()

void largePeaksBeforeFirstIsotope_ | ( | SpectrumPtrType | spectrum,
|  | double | mono_mz,
|  | double | mono_int,
|  | int & | nr_occurrences,
|  | double & | max_ratio
| ) |  |

private

Determine whether the current m/z value is a monoisotopic peak.

This function will try to determine whether the current peak is a monoisotopic peak or not. It will do so by searching for an intense peak at a lower m/z that could explain the current peak as part of a isotope pattern.

Parameters

  spectrum | The spectrum (MS1 or MS2)
  mono_mz | The m/z value where a monoisotopic is expected
  mono_int | The intensity of the monoisotopic peak (peak at mono_mz)
  nr_occurrences | Will contain the count of how often a peak is found at lower m/z than mono_mz with an intensity higher than mono_int. Multiple charge states are tested, see class parameter dia_nr_charges_
  nr_occurrences | Will contain the maximum ratio of a peaks intensity compared to the monoisotopic peak intensity how often a peak is found at lower m/z than mono_mz with an intensity higher than mono_int. Multiple charge states are tested, see class parameter dia_nr_charges_

## ◆ operator=()

DIAScoring& operator= | ( | const DIAScoring & | rhs | ) |

private

Assignment operator (algorithm class)

## ◆ score_with_isotopes()

void score_with_isotopes | ( | SpectrumPtrType | spectrum,
|  | const std::vector< TransitionType > & | transitions,
|  | double & | dotprod,
|  | double & | manhattan
| ) |  |

Dotproduct / Manhatten score with theoretical spectrum.

## ◆ scoreIsotopePattern_()

double scoreIsotopePattern_ | ( | double | product_mz,
|  | const std::vector< double > & | isotopes_int,
|  | int | putative_fragment_charge,
|  | const std::string & | sum_formula = `""`
| ) |  |

private

Compare an experimental isotope pattern to a theoretical one.

This function will take an array of isotope intensities and compare them to the theoretically expected ones for the given m/z using an averagine model. The returned value is a Pearson correlation between the experimental and theoretical pattern.

## ◆ updateMembers_()

void updateMembers_ | ( |  | ) |

override private virtual

Synchronize members with param class.

Reimplemented from DefaultParamHandler.

## Member Data Documentation

## ◆ dia_byseries_intensity_min_

double dia_byseries_intensity_min_

private

## ◆ dia_byseries_ppm_diff_

double dia_byseries_ppm_diff_

private

## ◆ dia_centroided_

double dia_centroided_

private

## ◆ dia_extract_window_

double dia_extract_window_

private

## ◆ dia_extraction_ppm_

bool dia_extraction_ppm_

private

## ◆ dia_nr_charges_

double dia_nr_charges_

private

## ◆ dia_nr_isotopes_

double dia_nr_isotopes_

private

## ◆ generator

TheoreticalSpectrumGenerator* generator

private

## ◆ peak_before_mono_max_ppm_diff_

double peak_before_mono_max_ppm_diff_

private