| OpenMS 2.5.0

Public Member Functions | Private Attributes | List of all members
MRMScoring Class Reference

This class implements different scores for peaks found in SRM/MRM. More...

`#include <OpenMS/OPENSWATHALGO/ALGO/MRMScoring.h>`

## Public Types

typedef OpenSwath::Scoring::XCorrArrayType | XCorrArrayType
| Type definitions. More...
typedef std::vector< std::vector< XCorrArrayType > > | XCorrMatrixType
| Cross Correlation matrix. More...
typedef std::string | String
typedef OpenSwath::SpectrumPtr | SpectrumType
typedef OpenSwath::LightTransition | TransitionType
typedef OpenSwath::LightCompound | PeptideType
typedef OpenSwath::LightProtein | ProteinType
typedef boost::shared_ptr< OpenSwath::IFeature > | FeatureType

## Public Member Functions

const XCorrMatrixType & | getXCorrContrastMatrix () const
| non-mutable access to the cross-correlation contrast matrix More...
const XCorrMatrixType & | getXCorrPrecursorContrastMatrix () const
| non-mutable access to the cross-correlation precursor contrast matrix More...
const XCorrMatrixType & | getXCorrPrecursorCombinedMatrix () const
| non-mutable access to the cross-correlation precursor contrast matrix More...
const std::vector< std::vector< double > > & | getMIContrastMatrix () const
| non-mutable access to the MI contrast matrix More...
const std::vector< std::vector< double > > & | getMIPrecursorContrastMatrix () const
| non-mutable access to the MI precursor contrast matrix More...
const std::vector< std::vector< double > > & | getMIPrecursorCombinedMatrix () const
| non-mutable access to the MI precursor combined matrix More...
void | initializeMIMatrix (OpenSwath::IMRMFeature *mrmfeature, std::vector< String > native_ids)
| Initialize the scoring object and building the MI matrix. More...
void | initializeMIContrastMatrix (OpenSwath::IMRMFeature *mrmfeature, std::vector< String > native_ids_set1, std::vector< String > native_ids_set2)
| Initialize the scoring object and building the MI matrix of chromatograms of set1 (e.g. identification transitions) vs set2 (e.g. detection transitions) More...
void | initializeMIPrecursorMatrix (OpenSwath::IMRMFeature *mrmfeature, std::vector< String > precursor_ids)
| Initialize the scoring object and building the MI matrix. More...
void | initializeMIPrecursorContrastMatrix (OpenSwath::IMRMFeature *mrmfeature, const std::vector< String > &precursor_ids, const std::vector< String > &native_ids)
| Initialize the mutual information vector against the MS1 trace. More...
void | initializeMIPrecursorCombinedMatrix (OpenSwath::IMRMFeature *mrmfeature, const std::vector< String > &precursor_ids, const std::vector< String > &native_ids)
| Initialize the mutual information vector with the MS1 trace. More...
double | calcMIScore ()
double | calcMIWeightedScore (const std::vector< double > &normalized_library_intensity)
double | calcMIPrecursorScore ()
double | calcMIPrecursorContrastScore ()
double | calcMIPrecursorCombinedScore ()
std::vector< double > | calcSeparateMIContrastScore ()
Accessors
const XCorrMatrixType & | getXCorrMatrix () const
| non-mutable access to the cross-correlation matrix More...

## Private Attributes

XCorrMatrixType | xcorr_precursor_matrix_
| the precomputed cross correlation matrix of the MS1 trace More...
XCorrMatrixType | xcorr_precursor_contrast_matrix_
| the precomputed cross correlation against the MS1 trace More...
XCorrMatrixType | xcorr_precursor_combined_matrix_
| the precomputed cross correlation with the MS1 trace More...
std::vector< std::vector< double > > | mi_matrix_
| the precomputed mutual information matrix More...
std::vector< std::vector< double > > | mi_contrast_matrix_
| the precomputed contrast mutual information matrix More...
std::vector< std::vector< double > > | mi_precursor_matrix_
| the precomputed mutual information matrix of the MS1 trace More...
std::vector< std::vector< double > > | mi_precursor_contrast_matrix_
| the precomputed contrast mutual information matrix against the MS1 trace More...
std::vector< std::vector< double > > | mi_precursor_combined_matrix_
| the precomputed contrast mutual information matrix with the MS1 trace More...
Members
XCorrMatrixType | xcorr_matrix_
| the precomputed cross correlation matrix More...
XCorrMatrixType | xcorr_contrast_matrix_
| the precomputed contrast cross correlation More...

## Scores

void | initializeXCorrMatrix (const std::vector< std::vector< double > > &data)
| Initialize the scoring object and building the cross-correlation matrix. More...
void | initializeXCorrMatrix (OpenSwath::IMRMFeature *mrmfeature, const std::vector< String > &native_ids)
| Initialize the scoring object and building the cross-correlation matrix. More...
void | initializeXCorrContrastMatrix (OpenSwath::IMRMFeature *mrmfeature, const std::vector< String > &native_ids_set1, const std::vector< String > &native_ids_set2)
| Initialize the scoring object and building the cross-correlation matrix of chromatograms of set1 (e.g. identification transitions) vs set2 (e.g. detection transitions) More...
void | initializeXCorrPrecursorMatrix (OpenSwath::IMRMFeature *mrmfeature, const std::vector< String > &precursor_ids)
| Initialize the scoring object and building the cross-correlation matrix. More...
void | initializeXCorrPrecursorContrastMatrix (OpenSwath::IMRMFeature *mrmfeature, const std::vector< String > &precursor_ids, const std::vector< String > &native_ids)
| Initialize the scoring object and building the cross-correlation matrix of chromatograms of precursor isotopes vs transitions. More...
void | initializeXCorrPrecursorContrastMatrix (const std::vector< std::vector< double > > &data_precursor, const std::vector< std::vector< double > > &data_fragments)
| Initialize the scoring object and building the cross-correlation matrix of chromatograms of precursor isotopes vs transitions. More...
void | initializeXCorrPrecursorCombinedMatrix (OpenSwath::IMRMFeature *mrmfeature, const std::vector< String > &precursor_ids, const std::vector< String > &native_ids)
| Initialize the scoring object and building the cross-correlation matrix of chromatograms of precursor isotopes and transitions. More...
double | calcXcorrCoelutionScore ()
double | calcXcorrCoelutionWeightedScore (const std::vector< double > &normalized_library_intensity)
double | calcXcorrContrastCoelutionScore ()
| calculate the cross-correlation contrast score More...
std::vector< double > | calcSeparateXcorrContrastCoelutionScore ()
| calculate the separate cross-correlation contrast score More...
double | calcXcorrPrecursorCoelutionScore ()
| calculate the precursor cross-correlation contrast score More...
double | calcXcorrPrecursorContrastCoelutionScore ()
double | calcXcorrPrecursorCombinedCoelutionScore ()
| calculate the precursor cross-correlation coelution score including the transitions More...
double | calcXcorrShapeScore ()
double | calcXcorrShapeWeightedScore (const std::vector< double > &normalized_library_intensity)
double | calcXcorrContrastShapeScore ()
| calculate the cross-correlation contrast shape score More...
std::vector< double > | calcSeparateXcorrContrastShapeScore ()
| calculate the separate cross-correlation contrast shape score More...
double | calcXcorrPrecursorShapeScore ()
| calculate the precursor cross-correlation shape score More...
double | calcXcorrPrecursorContrastShapeScore ()
| calculate the precursor cross-correlation shape score against the transitions More...
double | calcXcorrPrecursorCombinedShapeScore ()
| calculate the precursor cross-correlation shape score including the transitions More...
const std::vector< std::vector< double > > & | getMIMatrix () const
| non-mutable access to the MI matrix More...
static void | calcLibraryScore (OpenSwath::IMRMFeature *mrmfeature, const std::vector< TransitionType > &transitions, double &correlation, double &norm_manhattan, double &manhattan, double &dotprod, double &spectral_angle, double &rmsd)
| calculate the library correlation score More...
static double | calcRTScore (const PeptideType &peptide, double normalized_experimental_rt)
| calculate the retention time correlation score More...
static double | calcSNScore (OpenSwath::IMRMFeature *mrmfeature, std::vector< OpenSwath::ISignalToNoisePtr > &signal_noise_estimators)
| calculate the Signal to Noise ratio More...
static std::vector< double > | calcSeparateSNScore (OpenSwath::IMRMFeature *mrmfeature, std::vector< OpenSwath::ISignalToNoisePtr > &signal_noise_estimators)

## Detailed Description

This class implements different scores for peaks found in SRM/MRM.

It uses scores based on different parameters of the peaks from the individual transitions and stores them individually. The idea and the scores are based on the following paper: Reiter L, Rinner O, Picotti P, Huettenhain R, Beck M, Brusniak MY, Hengartner MO, Aebersold R. mProphet: automated data processing and statistical validation for large-scale SRM experiments. Nat Methods. 2011 May;8(5):430-5. Epub 2011 Mar 20.

The currently implemented scores include:

- xcorr_coelution: Cross-correlation of the different transitions
- xcorr_shape: Cross-correlation shape score (whether the maximal Cross-correlation coincides with the maximal intensity)
- library_rmsd: normalized RMSD of the measured intensities to the expected intensities
- library_correlation: correlation of the measured intensities to the expected intensities
- rt_score: deviation from the expected retention time
- elution_fit_score: how well the elution profile fits a theoretical elution profile

## Member Typedef Documentation

## ◆ FeatureType

typedef boost::shared_ptr<OpenSwath::IFeature> FeatureType

## ◆ PeptideType

typedef OpenSwath::LightCompound PeptideType

## ◆ ProteinType

typedef OpenSwath::LightProtein ProteinType

## ◆ SpectrumType

typedef OpenSwath::SpectrumPtr SpectrumType

## ◆ String

typedef std::string String

## ◆ TransitionType

typedef OpenSwath::LightTransition TransitionType

## ◆ XCorrArrayType

typedef OpenSwath::Scoring::XCorrArrayType XCorrArrayType

Type definitions.

Cross Correlation array

## ◆ XCorrMatrixType

typedef std::vector<std::vector<XCorrArrayType> > XCorrMatrixType

Cross Correlation matrix.

## Member Function Documentation

## ◆ calcLibraryScore()

static void calcLibraryScore | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | const std::vector< TransitionType > & | transitions,
|  | double & | correlation,
|  | double & | norm_manhattan,
|  | double & | manhattan,
|  | double & | dotprod,
|  | double & | spectral_angle,
|  | double & | rmsd
| ) |  |

static

calculate the library correlation score

## ◆ calcMIPrecursorCombinedScore()

double calcMIPrecursorCombinedScore | ( |  | ) |

## ◆ calcMIPrecursorContrastScore()

double calcMIPrecursorContrastScore | ( |  | ) |

## ◆ calcMIPrecursorScore()

double calcMIPrecursorScore | ( |  | ) |

## ◆ calcMIScore()

double calcMIScore | ( |  | ) |

## ◆ calcMIWeightedScore()

double calcMIWeightedScore | ( | const std::vector< double > & | normalized_library_intensity | ) |

## ◆ calcRTScore()

static double calcRTScore | ( | const PeptideType & | peptide,
|  | double | normalized_experimental_rt
| ) |  |

static

calculate the retention time correlation score

## ◆ calcSeparateMIContrastScore()

std::vector<double> calcSeparateMIContrastScore | ( |  | ) |

## ◆ calcSeparateSNScore()

static std::vector<double> calcSeparateSNScore | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | std::vector< OpenSwath::ISignalToNoisePtr > & | signal_noise_estimators
| ) |  |

static

## ◆ calcSeparateXcorrContrastCoelutionScore()

std::vector<double> calcSeparateXcorrContrastCoelutionScore | ( |  | ) |

calculate the separate cross-correlation contrast score

## ◆ calcSeparateXcorrContrastShapeScore()

std::vector<double> calcSeparateXcorrContrastShapeScore | ( |  | ) |

calculate the separate cross-correlation contrast shape score

## ◆ calcSNScore()

static double calcSNScore | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | std::vector< OpenSwath::ISignalToNoisePtr > & | signal_noise_estimators
| ) |  |

static

calculate the Signal to Noise ratio

## ◆ calcXcorrCoelutionScore()

double calcXcorrCoelutionScore | ( |  | ) |

## ◆ calcXcorrCoelutionWeightedScore()

double calcXcorrCoelutionWeightedScore | ( | const std::vector< double > & | normalized_library_intensity | ) |

## ◆ calcXcorrContrastCoelutionScore()

double calcXcorrContrastCoelutionScore | ( |  | ) |

calculate the cross-correlation contrast score

## ◆ calcXcorrContrastShapeScore()

double calcXcorrContrastShapeScore | ( |  | ) |

calculate the cross-correlation contrast shape score

## ◆ calcXcorrPrecursorCoelutionScore()

double calcXcorrPrecursorCoelutionScore | ( |  | ) |

calculate the precursor cross-correlation contrast score

## ◆ calcXcorrPrecursorCombinedCoelutionScore()

double calcXcorrPrecursorCombinedCoelutionScore | ( |  | ) |

calculate the precursor cross-correlation coelution score including the transitions

## ◆ calcXcorrPrecursorCombinedShapeScore()

double calcXcorrPrecursorCombinedShapeScore | ( |  | ) |

calculate the precursor cross-correlation shape score including the transitions

## ◆ calcXcorrPrecursorContrastCoelutionScore()

double calcXcorrPrecursorContrastCoelutionScore | ( |  | ) |

## ◆ calcXcorrPrecursorContrastShapeScore()

double calcXcorrPrecursorContrastShapeScore | ( |  | ) |

calculate the precursor cross-correlation shape score against the transitions

## ◆ calcXcorrPrecursorShapeScore()

double calcXcorrPrecursorShapeScore | ( |  | ) |

calculate the precursor cross-correlation shape score

## ◆ calcXcorrShapeScore()

double calcXcorrShapeScore | ( |  | ) |

## ◆ calcXcorrShapeWeightedScore()

double calcXcorrShapeWeightedScore | ( | const std::vector< double > & | normalized_library_intensity | ) |

## ◆ getMIContrastMatrix()

const std::vector< std::vector<double> >& getMIContrastMatrix | ( |  | ) | const

non-mutable access to the MI contrast matrix

## ◆ getMIMatrix()

const std::vector< std::vector<double> >& getMIMatrix | ( |  | ) | const

non-mutable access to the MI matrix

## ◆ getMIPrecursorCombinedMatrix()

const std::vector< std::vector<double> >& getMIPrecursorCombinedMatrix | ( |  | ) | const

non-mutable access to the MI precursor combined matrix

## ◆ getMIPrecursorContrastMatrix()

const std::vector< std::vector<double> >& getMIPrecursorContrastMatrix | ( |  | ) | const

non-mutable access to the MI precursor contrast matrix

## ◆ getXCorrContrastMatrix()

const XCorrMatrixType& getXCorrContrastMatrix | ( |  | ) | const

non-mutable access to the cross-correlation contrast matrix

## ◆ getXCorrMatrix()

const XCorrMatrixType& getXCorrMatrix | ( |  | ) | const

non-mutable access to the cross-correlation matrix

## ◆ getXCorrPrecursorCombinedMatrix()

const XCorrMatrixType& getXCorrPrecursorCombinedMatrix | ( |  | ) | const

non-mutable access to the cross-correlation precursor contrast matrix

## ◆ getXCorrPrecursorContrastMatrix()

const XCorrMatrixType& getXCorrPrecursorContrastMatrix | ( |  | ) | const

non-mutable access to the cross-correlation precursor contrast matrix

## ◆ initializeMIContrastMatrix()

void initializeMIContrastMatrix | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | std::vector< String > | native_ids_set1,
|  | std::vector< String > | native_ids_set2
| ) |  |

Initialize the scoring object and building the MI matrix of chromatograms of set1 (e.g. identification transitions) vs set2 (e.g. detection transitions)

## ◆ initializeMIMatrix()

void initializeMIMatrix | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | std::vector< String > | native_ids
| ) |  |

Initialize the scoring object and building the MI matrix.

## ◆ initializeMIPrecursorCombinedMatrix()

void initializeMIPrecursorCombinedMatrix | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | const std::vector< String > & | precursor_ids,
|  | const std::vector< String > & | native_ids
| ) |  |

Initialize the mutual information vector with the MS1 trace.

## ◆ initializeMIPrecursorContrastMatrix()

void initializeMIPrecursorContrastMatrix | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | const std::vector< String > & | precursor_ids,
|  | const std::vector< String > & | native_ids
| ) |  |

Initialize the mutual information vector against the MS1 trace.

## ◆ initializeMIPrecursorMatrix()

void initializeMIPrecursorMatrix | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | std::vector< String > | precursor_ids
| ) |  |

Initialize the scoring object and building the MI matrix.

## ◆ initializeXCorrContrastMatrix()

void initializeXCorrContrastMatrix | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | const std::vector< String > & | native_ids_set1,
|  | const std::vector< String > & | native_ids_set2
| ) |  |

Initialize the scoring object and building the cross-correlation matrix of chromatograms of set1 (e.g. identification transitions) vs set2 (e.g. detection transitions)

## ◆ initializeXCorrMatrix() [1/2]

void initializeXCorrMatrix | ( | const std::vector< std::vector< double > > & | data | ) |

Initialize the scoring object and building the cross-correlation matrix.

## ◆ initializeXCorrMatrix() [2/2]

void initializeXCorrMatrix | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | const std::vector< String > & | native_ids
| ) |  |

Initialize the scoring object and building the cross-correlation matrix.

## ◆ initializeXCorrPrecursorCombinedMatrix()

void initializeXCorrPrecursorCombinedMatrix | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | const std::vector< String > & | precursor_ids,
|  | const std::vector< String > & | native_ids
| ) |  |

Initialize the scoring object and building the cross-correlation matrix of chromatograms of precursor isotopes and transitions.

## ◆ initializeXCorrPrecursorContrastMatrix() [1/2]

void initializeXCorrPrecursorContrastMatrix | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | const std::vector< String > & | precursor_ids,
|  | const std::vector< String > & | native_ids
| ) |  |

Initialize the scoring object and building the cross-correlation matrix of chromatograms of precursor isotopes vs transitions.

## ◆ initializeXCorrPrecursorContrastMatrix() [2/2]

void initializeXCorrPrecursorContrastMatrix | ( | const std::vector< std::vector< double > > & | data_precursor,
|  | const std::vector< std::vector< double > > & | data_fragments
| ) |  |

Initialize the scoring object and building the cross-correlation matrix of chromatograms of precursor isotopes vs transitions.

## ◆ initializeXCorrPrecursorMatrix()

void initializeXCorrPrecursorMatrix | ( | OpenSwath::IMRMFeature * | mrmfeature,
|  | const std::vector< String > & | precursor_ids
| ) |  |

Initialize the scoring object and building the cross-correlation matrix.

## Member Data Documentation

## ◆ mi_contrast_matrix_

std::vector< std::vector<double> > mi_contrast_matrix_

private

the precomputed contrast mutual information matrix

## ◆ mi_matrix_

std::vector< std::vector<double> > mi_matrix_

private

the precomputed mutual information matrix

## ◆ mi_precursor_combined_matrix_

std::vector< std::vector<double> > mi_precursor_combined_matrix_

private

the precomputed contrast mutual information matrix with the MS1 trace

## ◆ mi_precursor_contrast_matrix_

std::vector< std::vector<double> > mi_precursor_contrast_matrix_

private

the precomputed contrast mutual information matrix against the MS1 trace

## ◆ mi_precursor_matrix_

std::vector< std::vector<double> > mi_precursor_matrix_

private

the precomputed mutual information matrix of the MS1 trace

## ◆ xcorr_contrast_matrix_

XCorrMatrixType xcorr_contrast_matrix_

private

the precomputed contrast cross correlation

## ◆ xcorr_matrix_

XCorrMatrixType xcorr_matrix_

private

the precomputed cross correlation matrix

## ◆ xcorr_precursor_combined_matrix_

XCorrMatrixType xcorr_precursor_combined_matrix_

private

the precomputed cross correlation with the MS1 trace

## ◆ xcorr_precursor_contrast_matrix_

XCorrMatrixType xcorr_precursor_contrast_matrix_

private

the precomputed cross correlation against the MS1 trace

## ◆ xcorr_precursor_matrix_

XCorrMatrixType xcorr_precursor_matrix_

private

the precomputed cross correlation matrix of the MS1 trace