class pyopenms.HyperScore#

Bases: object

Cython implementation of _HyperScore

Original C++ documentation is available here



__init__(self) None

An implementation of the X!Tandem HyperScore PSM scoring function


__init__(self, in_0: HyperScore) None




compute(self, fragment_mass_tolerance, ...)

Compute the (ln transformed) X!Tandem HyperScore

compute(self, fragment_mass_tolerance: float, fragment_mass_tolerance_unit_ppm: bool, exp_spectrum: MSSpectrum, theo_spectrum: MSSpectrum) float#

Compute the (ln transformed) X!Tandem HyperScore

  1. the dot product of peak intensities between matching peaks in experimental and theoretical spectrum is calculated

  2. the HyperScore is calculated from the dot product by multiplying by factorials of matching b- and y-ions


Peak intensities of the theoretical spectrum are typically 1 or TIC normalized, but can also be e.g. ion probabilities

  • fragment_mass_tolerance – Mass tolerance applied left and right of the theoretical spectrum peak position

  • fragment_mass_tolerance_unit_ppm – Unit of the mass tolerance is: Thomson if false, ppm if true

  • exp_spectrum – Measured spectrum

  • theo_spectrum – Theoretical spectrum Peaks need to contain an ion annotation as provided by TheoreticalSpectrumGenerator