OpenMS
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MorpheusScore.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: Timo Sachsenberg $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
12 #include <OpenMS/CONCEPT/Types.h>
13 #include <OpenMS/CONCEPT/Macros.h>
15 
16 namespace OpenMS
17 {
18 
23 struct OPENMS_DLLAPI MorpheusScore
24 {
25 
27  struct OPENMS_DLLAPI Result
28  {
29  Size matches = 0;
30  Size n_peaks = 0;
31  float score = 0;
32  float MIC = 0;
33  float TIC = 0;
34  float err = 0;
35  float err_ppm = 0;
36  };
37 
39  static Result compute(double fragment_mass_tolerance,
40  bool fragment_mass_tolerance_unit_ppm,
41  const PeakSpectrum& exp_spectrum,
42  const PeakSpectrum& theo_spectrum);
43 
45  static Result compute(double fragment_mass_tolerance,
46  bool fragment_mass_tolerance_unit_ppm,
47  const PeakSpectrum& exp_spectrum,
48  const DataArrays::IntegerDataArray& exp_charges,
49  const PeakSpectrum& theo_spectrum,
50  const DataArrays::IntegerDataArray& theo_charges);
51 };
52 
53 }
54 
55 
Integer data array class.
Definition: DataArrays.h:75
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
Definition: TIC.h:30
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:97
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
An implementation of the Morpheus PSM scoring function Inspired by a C# implementation by C....
Definition: MorpheusScore.h:24
static Result compute(double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &exp_spectrum, const PeakSpectrum &theo_spectrum)
returns Morpheus Score, #matched ions, #total ions, #matched intensities, #total fragment intensities...
static Result 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)
same as above but matches are only counted if charges match
score and subscores
Definition: MorpheusScore.h:28