An implementation of the X!Tandem HyperScore PSM scoring function.
More...
#include <OpenMS/ANALYSIS/ID/HyperScore.h>
|
| struct | PSMDetail |
| | compute the (ln transformed) X!Tandem HyperScore overload that returns some additional information on the match More...
|
| |
|
| static double | compute (double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &exp_spectrum, const PeakSpectrum &theo_spectrum) |
| | compute the (ln transformed) X!Tandem HyperScore
|
| |
| static double | computeWithDetail (double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &exp_spectrum, const PeakSpectrum &theo_spectrum, PSMDetail &d) |
| |
| static double | computeMassAccuracy (double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &exp_spectrum, const PeakSpectrum &theo_spectrum, double mass_error_sd_ppm, PSMDetail &detail) |
| | HyperScore with mass-accuracy-weighted fragment evidence.
|
| |
| static double | compute (double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &exp_spectrum, const DataArrays::IntegerDataArray &exp_charges, const PeakSpectrum &theo_spectrum, const DataArrays::IntegerDataArray &theo_charges) |
| |
| static double | compute (double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &exp_spectrum, const DataArrays::IntegerDataArray &exp_charges, const PeakSpectrum &theo_spectrum, const DataArrays::IntegerDataArray &theo_charges, std::vector< double > &intensity_sum) |
| |
|
| static double | logfactorial_ (const int x, int base=2) |
| | helper to compute the log factorial
|
| |
An implementation of the X!Tandem HyperScore PSM scoring function.
◆ OpenMS::HyperScore::PSMDetail
| struct OpenMS::HyperScore::PSMDetail |
compute the (ln transformed) X!Tandem HyperScore overload that returns some additional information on the match
| Class Members |
|
size_t |
matched_prefix_ions = 0 |
N-terminal ions (a, b, c) |
|
size_t |
matched_suffix_ions = 0 |
C-terminal ions (x, y, z) |
|
double |
mean_error = 0.0 |
|
◆ IndexScorePair
◆ compute() [1/3]
◆ compute() [2/3]
◆ compute() [3/3]
| static double compute |
( |
double |
fragment_mass_tolerance, |
|
|
bool |
fragment_mass_tolerance_unit_ppm, |
|
|
const PeakSpectrum & |
exp_spectrum, |
|
|
const PeakSpectrum & |
theo_spectrum |
|
) |
| |
|
static |
compute the (ln transformed) X!Tandem HyperScore
- the dot product of peak intensities between matching peaks in experimental and theoretical spectrum is calculated
- the HyperScore is calculated from the dot product by multiplying by factorials of matching b- and y-ions
- Note
- Peak intensities of the theoretical spectrum are typically 1 or TIC normalized, but can also be e.g. ion probabilities
- Parameters
-
| [in] | fragment_mass_tolerance | mass tolerance applied left and right of the theoretical spectrum peak position |
| [in] | fragment_mass_tolerance_unit_ppm | Unit of the mass tolerance is: Thomson if false, ppm if true |
| [in] | exp_spectrum | measured spectrum |
| [in] | theo_spectrum | theoretical spectrum Peaks need to contain an ion annotation as provided by TheoreticalSpectrumGenerator. |
◆ computeMassAccuracy()
| static double computeMassAccuracy |
( |
double |
fragment_mass_tolerance, |
|
|
bool |
fragment_mass_tolerance_unit_ppm, |
|
|
const PeakSpectrum & |
exp_spectrum, |
|
|
const PeakSpectrum & |
theo_spectrum, |
|
|
double |
mass_error_sd_ppm, |
|
|
PSMDetail & |
detail |
|
) |
| |
|
static |
HyperScore with mass-accuracy-weighted fragment evidence.
A matched ion with signed mass error e (ppm) contributes exp(-0.5*(e/sigma)^2) to its terminal ion count and intensity product. Fractional factorial rewards use max(0, lgamma(count+1)), agreeing with HyperScore for exact matches. The kernel is centred at zero and its width is fixed; it is a ranking statistic, not a PSM p-value.
- Parameters
-
| [in] | fragment_mass_tolerance | Positive finite match tolerance (Da or ppm). |
| [in] | fragment_mass_tolerance_unit_ppm | Whether matching tolerance is in ppm. |
| [in] | exp_spectrum | Experimental spectrum, sorted by m/z. |
| [in] | theo_spectrum | Theoretical spectrum, sorted by m/z, with ion names. |
| [in] | mass_error_sd_ppm | Positive finite Gaussian standard deviation in ppm. |
| [out] | detail | Unweighted match counts and mean absolute error in matching units. |
- Returns
- Nonnegative weighted log HyperScore; zero without matches.
- Exceptions
-
◆ computeWithDetail()
| static double computeWithDetail |
( |
double |
fragment_mass_tolerance, |
|
|
bool |
fragment_mass_tolerance_unit_ppm, |
|
|
const PeakSpectrum & |
exp_spectrum, |
|
|
const PeakSpectrum & |
theo_spectrum, |
|
|
PSMDetail & |
d |
|
) |
| |
|
static |
◆ logfactorial_()
| static double logfactorial_ |
( |
const int |
x, |
|
|
int |
base = 2 |
|
) |
| |
|
staticprivate |
helper to compute the log factorial