OpenMS
NuXLAnnotatedHit.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- 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/METADATA/PeptideHit.h> // for PeakAnnotation
14 
15 namespace OpenMS
16 {
20 {
21  public:
22  /*
23  Slim indices/views to lookup the actual sequence
24  */
26  SignedSize peptide_mod_index = 0; // enumeration index of the non-NA peptide modification
27  Size NA_mod_index = 0; // index of the NA modification
28  Size NA_adduct_amb_index = 0; // store index the entry in the set of ambiguous precursor adducts (e.g, C-NH3 vs. U-H2O)
29 
30  int isotope_error = 0; // wheter the hit has been matched with isotopic misassignment
31 
32  static constexpr const char UNKNOWN_NUCLEOTIDE = '?';
34 
60  float score = 0;
61 
68  float mass_error_p = 0;
69 
70  //
71  // Scores exclusively calculated from peaks without nucleotide shifts:
72  //
73 
78  float total_loss_score = 0;
79 
97  float immonium_score = 0;
98  float precursor_score = 0;
99 
104  float MIC = 0;
105  float err = 0;
106  float Morph = 0;
107 
111  float modds = 0;
112 
113  //
114  // Scores exclusively calculated from nucleotide shifted peaks:
115  //
116 
128 
134  float pl_MIC = 0;
135  float pl_err = 0.0;
136  float pl_Morph = 0;
137 
138  /*
139  The match odds (-log10) of observing this number of b-,a-, and y-ions with nucleotide shifts assuming a uniform distribution of noise peaks.
140  */
141  float pl_modds = 0;
142 
143  /*
144  The MIC of precursor with all nucleotide shifts.
145  Three variants: No additional loss, loss of water, and loss ammonia.
146  Charge states considered: 1..N (precursor charge)
147  */
148  float pl_pc_MIC = 0;
149 
168  float pl_im_MIC = 0;
169 
170  //
171  // Scores calculated from peaks with AND without nucleotide shifts:
172  //
173 
179  float total_MIC = 0;
180 
184  float marker_ions_score = 0;
185 
192  float ladder_score = 0;
200  float sequence_score = 0;
201 
205  int best_localization_position = -1; // UNKNOWN
206  std::vector<PeptideHit::PeakAnnotation> fragment_annotations;
207 
208  size_t tag_unshifted = 0;
209  size_t tag_shifted = 0;
210  size_t tag_XLed = 0; // tag that contains the transition from unshifted to shifted
211 
214  double wTop50 = 0;
215 
217 
218  static bool hasBetterScore(const NuXLAnnotatedHit& a, const NuXLAnnotatedHit& b)
219  {
220  return a.score > b.score;
221  }
222 };
223 }
224 
Definition: NuXLAnnotatedHit.h:20
static constexpr const char UNKNOWN_NUCLEOTIDE
Definition: NuXLAnnotatedHit.h:32
float pl_im_MIC
Definition: NuXLAnnotatedHit.h:168
float ladder_score
Definition: NuXLAnnotatedHit.h:192
size_t tag_XLed
Definition: NuXLAnnotatedHit.h:210
double matched_theo_fraction
Definition: NuXLAnnotatedHit.h:213
Size NA_adduct_amb_index
Definition: NuXLAnnotatedHit.h:28
float marker_ions_score
Definition: NuXLAnnotatedHit.h:184
float pl_err
Definition: NuXLAnnotatedHit.h:135
float MIC
Definition: NuXLAnnotatedHit.h:104
int isotope_error
Definition: NuXLAnnotatedHit.h:30
size_t tag_unshifted
Definition: NuXLAnnotatedHit.h:208
int best_localization_position
Definition: NuXLAnnotatedHit.h:205
float sequence_score
Definition: NuXLAnnotatedHit.h:200
double explained_peak_fraction
Definition: NuXLAnnotatedHit.h:212
float total_loss_score
Definition: NuXLAnnotatedHit.h:78
size_t n_theoretical_peaks
Definition: NuXLAnnotatedHit.h:216
String localization_scores
Definition: NuXLAnnotatedHit.h:203
double wTop50
Definition: NuXLAnnotatedHit.h:214
float err
Definition: NuXLAnnotatedHit.h:105
char cross_linked_nucleotide
Definition: NuXLAnnotatedHit.h:33
float partial_loss_score
Definition: NuXLAnnotatedHit.h:127
size_t tag_shifted
Definition: NuXLAnnotatedHit.h:209
float score
Definition: NuXLAnnotatedHit.h:60
float pl_MIC
Definition: NuXLAnnotatedHit.h:134
float modds
Definition: NuXLAnnotatedHit.h:111
static bool hasBetterScore(const NuXLAnnotatedHit &a, const NuXLAnnotatedHit &b)
Definition: NuXLAnnotatedHit.h:218
float Morph
Definition: NuXLAnnotatedHit.h:106
StringView sequence
Definition: NuXLAnnotatedHit.h:25
float precursor_score
Definition: NuXLAnnotatedHit.h:98
float pl_modds
Definition: NuXLAnnotatedHit.h:141
float mass_error_p
Definition: NuXLAnnotatedHit.h:68
float pl_Morph
Definition: NuXLAnnotatedHit.h:136
String best_localization
Definition: NuXLAnnotatedHit.h:204
float best_localization_score
Definition: NuXLAnnotatedHit.h:202
std::vector< PeptideHit::PeakAnnotation > fragment_annotations
Definition: NuXLAnnotatedHit.h:206
SignedSize peptide_mod_index
Definition: NuXLAnnotatedHit.h:26
float pl_pc_MIC
Definition: NuXLAnnotatedHit.h:148
Size NA_mod_index
Definition: NuXLAnnotatedHit.h:27
float immonium_score
Definition: NuXLAnnotatedHit.h:97
float total_MIC
Definition: NuXLAnnotatedHit.h:179
StringView provides a non-owning view on an existing string.
Definition: StringView.h:30
A more convenient string class.
Definition: String.h:34
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition: Types.h:104
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