![]() |
OpenMS
|
An implementation of the X!Tandem HyperScore PSM scoring function. More...
#include <OpenMS/ANALYSIS/ID/HyperScore.h>
Classes | |
| struct | PSMDetail |
| compute the (ln transformed) X!Tandem HyperScore overload that returns some additional information on the match More... | |
Public Types | |
| typedef std::pair< Size, double > | IndexScorePair |
Static Public Member Functions | |
| 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 | computeWithDetail (double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &exp_spectrum, const PeakSpectrum &theo_spectrum, const std::vector< uint8_t > &theo_ion_series, PSMDetail &d) |
| computeWithDetail() and computeMassAccuracy() for a theoretical spectrum without ion names | |
| static double | computeMassAccuracy (double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &exp_spectrum, const PeakSpectrum &theo_spectrum, const std::vector< uint8_t > &theo_ion_series, double mass_error_sd_ppm, PSMDetail &detail) |
| computeWithDetail() and computeMassAccuracy() for a theoretical spectrum without ion names | |
| 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 Private Member Functions | |
| 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.
| 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 | |
| typedef std::pair<Size, double> IndexScorePair |
|
static |
|
static |
|
static |
compute the (ln transformed) X!Tandem HyperScore
| [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. |
|
static |
computeWithDetail() and computeMassAccuracy() for a theoretical spectrum without ion names
theo_ion_series holds per peak of theo_spectrum 0 for an N-terminal (a, b, c) and 1 for a C-terminal (x, y, z) ion, as TheoreticalSpectrumGenerator::getIonSeriesSpectrum() provides it; any other value counts as neither. The scores are those of the overloads above for the ion names of the same ions.
| Exception::InvalidSize | if theo_ion_series does not hold one entry per peak |
|
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.
| [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. |
| Exception::InvalidParameter | for invalid tolerance or standard deviation. |
| Exception::InvalidValue | for incomplete theoretical ion annotations. |
|
static |
computeWithDetail() and computeMassAccuracy() for a theoretical spectrum without ion names
theo_ion_series holds per peak of theo_spectrum 0 for an N-terminal (a, b, c) and 1 for a C-terminal (x, y, z) ion, as TheoreticalSpectrumGenerator::getIonSeriesSpectrum() provides it; any other value counts as neither. The scores are those of the overloads above for the ion names of the same ions.
| Exception::InvalidSize | if theo_ion_series does not hold one entry per peak |
|
static |
|
staticprivate |
helper to compute the log factorial