OpenMS  2.8.0
Private Types | 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:
[legend]
Collaboration diagram for DIAScoring:
[legend]

Public Member Functions

Constructors and Destructor
 DIAScoring ()
 Default constructor. More...
 
 ~DIAScoring () override
 Destructor. 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 DefaultParamHandleroperator= (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 ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () 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...
 

DIA Scores

double dia_extract_window_
 
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_
 
bool dia_centroided_
 
TheoreticalSpectrumGeneratorgenerator
 
void dia_isotope_scores (const std::vector< TransitionType > &transitions, SpectrumPtrType spectrum, OpenSwath::IMRMFeature *mrmfeature, double &isotope_corr, double &isotope_overlap) const
 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) const
 Massdiff scores, see class description. More...
 
bool dia_ms1_massdiff_score (double precursor_mz, SpectrumPtrType spectrum, double &ppm_score) const
 
void dia_ms1_isotope_scores_averagine (double precursor_mz, SpectrumPtrType spectrum, double &isotope_corr, double &isotope_overlap, int charge_state) const
 Precursor isotope scores for precursors (peptides and metabolites) More...
 
void dia_ms1_isotope_scores (double precursor_mz, SpectrumPtrType spectrum, double &isotope_corr, double &isotope_overlap, const EmpiricalFormula &sum_formula) const
 
void dia_by_ion_score (SpectrumPtrType spectrum, AASequence &sequence, int charge, double &bseries_score, double &yseries_score) const
 b/y ion scores More...
 
void score_with_isotopes (SpectrumPtrType spectrum, const std::vector< TransitionType > &transitions, double &dotprod, double &manhattan) const
 Dotproduct / Manhattan score with theoretical spectrum. More...
 
 DIAScoring (const DIAScoring &rhs)
 Copy constructor (algorithm class) More...
 
DIAScoringoperator= (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) const
 Subfunction of dia_isotope_scores. More...
 
void getFirstIsotopeRelativeIntensities_ (const std::vector< TransitionType > &transitions, OpenSwath::IMRMFeature *mrmfeature, std::map< std::string, double > &intensities) const
 
void largePeaksBeforeFirstIsotope_ (SpectrumPtrType spectrum, double mono_mz, double mono_int, int &nr_occurrences, double &max_ratio) const
 Determine whether the current m/z value is a monoisotopic peak. More...
 
double scoreIsotopePattern_ (const std::vector< double > &isotopes_int, double product_mz, int putative_fragment_charge) const
 Compare an experimental isotope pattern to a theoretical one. More...
 
double scoreIsotopePattern_ (const std::vector< double > &isotopes_int, const EmpiricalFormula &sum_formula) const
 Compare an experimental isotope pattern to a theoretical one. More...
 
double scoreIsotopePattern_ (const std::vector< double > &isotopes_int, const IsotopeDistribution &isotope_dist) const
 Compare an experimental isotope pattern to a theoretical one. More...
 
void getIsotopeIntysFromExpSpec_ (double precursor_mz, SpectrumPtrType spectrum, std::vector< double > &isotopes_int, int charge_state) const
 

Additional Inherited Members

- Static Public Member Functions inherited from DefaultParamHandler
static void writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="")
 Writes all parameters to meta values. More...
 
- 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< Stringsubsections_
 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:

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:

NameTypeDefaultRestrictionsDescription
dia_extraction_window float0.05 min: 0.0DIA extraction window in Th or ppm.
dia_extraction_unit stringTh Th, ppmDIA extraction window unit
dia_centroided stringfalse true, falseUse centroided DIA data.
dia_byseries_intensity_min float300.0 min: 0.0DIA b/y series minimum intensity to consider.
dia_byseries_ppm_diff float10.0 min: 0.0DIA b/y series minimal difference in ppm to consider.
dia_nr_isotopes int4 min: 0DIA number of isotopes to consider.
dia_nr_charges int4 min: 0DIA number of charges to consider.
peak_before_mono_max_ppm_diff float20.0 min: 0.0DIA maximal difference in ppm to count a peak at lower m/z when searching for evidence that a peak might not be monoisotopic.

Note:

Member Typedef Documentation

◆ SpectrumPtrType

Type definitions.

Spectrum type, see Spectrum interface

◆ TransitionType

Transition interface (Transition, Peptide, Protein)

Constructor & Destructor Documentation

◆ DIAScoring() [1/2]

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 
) const

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 
) const

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 
) const

Massdiff scores, see class description.

◆ dia_ms1_isotope_scores()

void dia_ms1_isotope_scores ( double  precursor_mz,
SpectrumPtrType  spectrum,
double &  isotope_corr,
double &  isotope_overlap,
const EmpiricalFormula sum_formula 
) const

◆ dia_ms1_isotope_scores_averagine()

void dia_ms1_isotope_scores_averagine ( double  precursor_mz,
SpectrumPtrType  spectrum,
double &  isotope_corr,
double &  isotope_overlap,
int  charge_state 
) const

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 
) const

Precursor massdifference score

Parameters
precursor_mzExact m/z of the precursor to be evaluated
spectrumMS1 spectrum to be evaluated
ppm_scoreResulting 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 
) const
private

Subfunction of dia_isotope_scores.

◆ getFirstIsotopeRelativeIntensities_()

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

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

◆ getIsotopeIntysFromExpSpec_()

void getIsotopeIntysFromExpSpec_ ( double  precursor_mz,
SpectrumPtrType  spectrum,
std::vector< double > &  isotopes_int,
int  charge_state 
) const
private

Get the intensities of isotopes around precursor_mz in experimental spectrum and fill isotopes_int.

◆ largePeaksBeforeFirstIsotope_()

void largePeaksBeforeFirstIsotope_ ( SpectrumPtrType  spectrum,
double  mono_mz,
double  mono_int,
int &  nr_occurrences,
double &  max_ratio 
) const
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
spectrumThe spectrum (MS1 or MS2)
mono_mzThe m/z value where a monoisotopic is expected
mono_intThe intensity of the monoisotopic peak (peak at mono_mz)
nr_occurrencesWill 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_occurrencesWill 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 
) const

Dotproduct / Manhattan score with theoretical spectrum.

◆ scoreIsotopePattern_() [1/3]

double scoreIsotopePattern_ ( const std::vector< double > &  isotopes_int,
const EmpiricalFormula sum_formula 
) const
private

Compare an experimental isotope pattern to a theoretical one.

This function will take an array of isotope intensities and compare them (by order only; no m/z matching) to the theoretically expected ones for the given sum_formula. The returned value is a Pearson correlation between the experimental and theoretical pattern.

◆ scoreIsotopePattern_() [2/3]

double scoreIsotopePattern_ ( const std::vector< double > &  isotopes_int,
const IsotopeDistribution isotope_dist 
) const
private

Compare an experimental isotope pattern to a theoretical one.

This function will take an array of isotope intensities and compare them (by order only; no m/z matching) to the theoretically expected ones given by isotope_dist. The returned value is a Pearson correlation between the experimental and theoretical pattern.

◆ scoreIsotopePattern_() [3/3]

double scoreIsotopePattern_ ( const std::vector< double > &  isotopes_int,
double  product_mz,
int  putative_fragment_charge 
) const
private

Compare an experimental isotope pattern to a theoretical one.

This function will take an array of isotope intensities isotopes_int and compare them (by order only; no m/z matching) to the theoretically expected ones for the given product_mz using an averagine model. The returned value is a Pearson correlation between the experimental and theoretical pattern.

◆ updateMembers_()

void updateMembers_ ( )
overrideprivatevirtual

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_

bool 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