OpenMS
XQuestScores.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Eugen Netz $
6 // $Authors: Eugen Netz $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
13 #include <OpenMS/CONCEPT/Types.h>
15 #include <vector>
16 
17 namespace OpenMS
18 {
19 
24  class OPENMS_DLLAPI XQuestScores
25  {
26 
27  public:
35  static float preScore(Size matched_alpha, Size ions_alpha, Size matched_beta, Size ions_beta);
36 
42  static float preScore(Size matched_alpha, Size ions_alpha);
43 
53  static double matchOddsScore(const PeakSpectrum& theoretical_spec, const Size matched_size, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, bool is_xlink_spectrum = false, Size n_charges = 1);
54 
55  static double matchOddsScoreSimpleSpec(const std::vector< SimpleTSGXLMS::SimplePeak >& theoretical_spec, const Size matched_size, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, bool is_xlink_spectrum = false, Size n_charges = 1);
56 
57 
65  static double logOccupancyProb(const PeakSpectrum& theoretical_spec, const Size matched_size, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm);
66 
77  static double weightedTICScoreXQuest(Size alpha_size, Size beta_size, double intsum_alpha, double intsum_beta, double total_current, bool type_is_cross_link);
78 
89  static double weightedTICScore(Size alpha_size, Size beta_size, double intsum_alpha, double intsum_beta, double total_current, bool type_is_cross_link);
90 
98  static double matchedCurrentChain(const std::vector< std::pair< Size, Size > >& matched_spec_linear, const std::vector< std::pair< Size, Size > >& matched_spec_xlinks, const PeakSpectrum& spectrum_linear_peaks, const PeakSpectrum& spectrum_xlink_peaks);
99 
109  static double totalMatchedCurrent(const std::vector< std::pair< Size, Size > >& matched_spec_linear_alpha, const std::vector< std::pair< Size, Size > >& matched_spec_linear_beta, const std::vector< std::pair< Size, Size > >& matched_spec_xlinks_alpha, const std::vector< std::pair< Size, Size > >& matched_spec_xlinks_beta, const PeakSpectrum& spectrum_linear_peaks, const PeakSpectrum& spectrum_xlink_peaks);
110 
118  static std::vector< double > xCorrelation(const PeakSpectrum & spec1, const PeakSpectrum & spec2, Int maxshift, double tolerance);
119 
126  static double xCorrelationPrescore(const PeakSpectrum & spec1, const PeakSpectrum & spec2, double tolerance);
127  };
128 
129 }
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
An implementation of the scores for cross-link identification from the xQuest algorithm (O....
Definition: XQuestScores.h:25
static std::vector< double > xCorrelation(const PeakSpectrum &spec1, const PeakSpectrum &spec2, Int maxshift, double tolerance)
computes a crude cross-correlation between two spectra. Crude, because it uses a static binsize based...
static double matchOddsScore(const PeakSpectrum &theoretical_spec, const Size matched_size, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, bool is_xlink_spectrum=false, Size n_charges=1)
compute the match-odds score, a score based on the probability of getting the given number of matched...
static float preScore(Size matched_alpha, Size ions_alpha)
compute a simple and fast to compute pre-score for a mono-link spectrum match
static double weightedTICScore(Size alpha_size, Size beta_size, double intsum_alpha, double intsum_beta, double total_current, bool type_is_cross_link)
compute the weighted total ion current score for a cross-link. Scaling changed from original xQuest.
static double xCorrelationPrescore(const PeakSpectrum &spec1, const PeakSpectrum &spec2, double tolerance)
computes a crude dot product between two spectra. Crude, because it uses a static binsize based on a ...
static double weightedTICScoreXQuest(Size alpha_size, Size beta_size, double intsum_alpha, double intsum_beta, double total_current, bool type_is_cross_link)
compute the weighted total ion current score for a cross-link. Reimplementation from xQuest.
static double matchedCurrentChain(const std::vector< std::pair< Size, Size > > &matched_spec_linear, const std::vector< std::pair< Size, Size > > &matched_spec_xlinks, const PeakSpectrum &spectrum_linear_peaks, const PeakSpectrum &spectrum_xlink_peaks)
computes sum of peak intensities of matched peaks for either the alpha or the beta peptide
static double matchOddsScoreSimpleSpec(const std::vector< SimpleTSGXLMS::SimplePeak > &theoretical_spec, const Size matched_size, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, bool is_xlink_spectrum=false, Size n_charges=1)
static float preScore(Size matched_alpha, Size ions_alpha, Size matched_beta, Size ions_beta)
compute a simple and fast to compute pre-score for a cross-link spectrum match
static double logOccupancyProb(const PeakSpectrum &theoretical_spec, const Size matched_size, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm)
compute the logOccupancyProb score, similar to the match_odds, a score based on the probability of ge...
static double totalMatchedCurrent(const std::vector< std::pair< Size, Size > > &matched_spec_linear_alpha, const std::vector< std::pair< Size, Size > > &matched_spec_linear_beta, const std::vector< std::pair< Size, Size > > &matched_spec_xlinks_alpha, const std::vector< std::pair< Size, Size > > &matched_spec_xlinks_beta, const PeakSpectrum &spectrum_linear_peaks, const PeakSpectrum &spectrum_xlink_peaks)
computes sum of peak intensities of all matched peaks
int Int
Signed integer type.
Definition: Types.h:76
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22