HyperScore#

class pyopenms.HyperScore#

Bases: object

OpenMS class HyperScore

__init__() → None#
__init__(arg: pyopenms.HyperScore, /) → None

Methods

__init__()

compute(fragment_mass_tolerance, ...)

Compute the (ln transformed) X!Tandem HyperScore

static compute(fragment_mass_tolerance: float, fragment_mass_tolerance_unit_ppm: bool, exp_spectrum: pyopenms.MSSpectrum, theo_spectrum: pyopenms.MSSpectrum) → float#
static compute(fragment_mass_tolerance: float, fragment_mass_tolerance_unit_ppm: bool, exp_spectrum: pyopenms.MSSpectrum, exp_charges: pyopenms.IntegerDataArray, theo_spectrum: pyopenms.MSSpectrum, theo_charges: pyopenms.IntegerDataArray) → float
static compute(fragment_mass_tolerance: float, fragment_mass_tolerance_unit_ppm: bool, exp_spectrum: pyopenms.MSSpectrum, exp_charges: pyopenms.IntegerDataArray, theo_spectrum: pyopenms.MSSpectrum, theo_charges: pyopenms.IntegerDataArray, intensity_sum: collections.abc.Sequence[float]) → tuple

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

Note:

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

Parameters:
  • 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