OpenMS
Loading...
Searching...
No Matches
NuXLAnnotatedHit.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, 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
13#include <string_view>
14#include <tuple>
15
16namespace OpenMS
17{
21{
22 public:
23 /*
24 Slim indices/views to lookup the actual sequence
25 */
26 std::string_view sequence;
27 SignedSize peptide_mod_index = 0; // enumeration index of the non-NA peptide modification
28 Size NA_mod_index = 0; // index of the NA modification
29 Size NA_adduct_amb_index = 0; // store index the entry in the set of ambiguous precursor adducts (e.g, C-NH3 vs. U-H2O)
30
31 int isotope_error = 0; // wheter the hit has been matched with isotopic misassignment
32
33 static constexpr const char UNKNOWN_NUCLEOTIDE = '?';
35
61 float score = 0;
62
69 float mass_error_p = 0;
70
71 //
72 // Scores exclusively calculated from peaks without nucleotide shifts:
73 //
74
80
98 float immonium_score = 0;
99 float precursor_score = 0;
100
105 float MIC = 0;
106 float err = 0;
107 float Morph = 0;
108
112 float modds = 0;
113
114 //
115 // Scores exclusively calculated from nucleotide shifted peaks:
116 //
117
129
135 float pl_MIC = 0;
136 float pl_err = 0.0;
137 float pl_Morph = 0;
138
139 /*
140 The match odds (-log10) of observing this number of b-,a-, and y-ions with nucleotide shifts assuming a uniform distribution of noise peaks.
141 */
142 float pl_modds = 0;
143
144 /*
145 The MIC of precursor with all nucleotide shifts.
146 Three variants: No additional loss, loss of water, and loss ammonia.
147 Charge states considered: 1..N (precursor charge)
148 */
149 float pl_pc_MIC = 0;
150
169 float pl_im_MIC = 0;
170
171 //
172 // Scores calculated from peaks with AND without nucleotide shifts:
173 //
174
180 float total_MIC = 0;
181
186
193 float ladder_score = 0;
201 float sequence_score = 0;
202
204 std::string localization_scores = "0";
205 std::string best_localization;
206 int best_localization_position = -1; // UNKNOWN
207 std::vector<PeptideHit::PeakAnnotation> fragment_annotations;
208
209 size_t tag_unshifted = 0;
210 size_t tag_shifted = 0;
211 size_t tag_XLed = 0; // tag that contains the transition from unshifted to shifted
212
215 double wTop50 = 0;
216
218
219 static bool hasBetterScore(const NuXLAnnotatedHit& a, const NuXLAnnotatedHit& b)
220 {
221 if (a.score != b.score) return a.score > b.score;
222 // deterministic tie-breaker: copies of a hit that differ only in the precursor adduct or cross-linked nucleotide often score equally
225 }
226};
227}
228
Definition NuXLAnnotatedHit.h:21
static constexpr const char UNKNOWN_NUCLEOTIDE
Definition NuXLAnnotatedHit.h:33
float pl_im_MIC
Definition NuXLAnnotatedHit.h:169
float ladder_score
Definition NuXLAnnotatedHit.h:193
size_t tag_XLed
Definition NuXLAnnotatedHit.h:211
double matched_theo_fraction
Definition NuXLAnnotatedHit.h:214
Size NA_adduct_amb_index
Definition NuXLAnnotatedHit.h:29
float marker_ions_score
Definition NuXLAnnotatedHit.h:185
float pl_err
Definition NuXLAnnotatedHit.h:136
float MIC
Definition NuXLAnnotatedHit.h:105
int isotope_error
Definition NuXLAnnotatedHit.h:31
size_t tag_unshifted
Definition NuXLAnnotatedHit.h:209
int best_localization_position
Definition NuXLAnnotatedHit.h:206
std::string localization_scores
Definition NuXLAnnotatedHit.h:204
float sequence_score
Definition NuXLAnnotatedHit.h:201
double explained_peak_fraction
Definition NuXLAnnotatedHit.h:213
float total_loss_score
Definition NuXLAnnotatedHit.h:79
size_t n_theoretical_peaks
Definition NuXLAnnotatedHit.h:217
double wTop50
Definition NuXLAnnotatedHit.h:215
float err
Definition NuXLAnnotatedHit.h:106
char cross_linked_nucleotide
Definition NuXLAnnotatedHit.h:34
float partial_loss_score
Definition NuXLAnnotatedHit.h:128
size_t tag_shifted
Definition NuXLAnnotatedHit.h:210
float score
Definition NuXLAnnotatedHit.h:61
float pl_MIC
Definition NuXLAnnotatedHit.h:135
float modds
Definition NuXLAnnotatedHit.h:112
static bool hasBetterScore(const NuXLAnnotatedHit &a, const NuXLAnnotatedHit &b)
Definition NuXLAnnotatedHit.h:219
float Morph
Definition NuXLAnnotatedHit.h:107
std::string_view sequence
Definition NuXLAnnotatedHit.h:26
float precursor_score
Definition NuXLAnnotatedHit.h:99
float pl_modds
Definition NuXLAnnotatedHit.h:142
float mass_error_p
Definition NuXLAnnotatedHit.h:69
std::string best_localization
Definition NuXLAnnotatedHit.h:205
float pl_Morph
Definition NuXLAnnotatedHit.h:137
float best_localization_score
Definition NuXLAnnotatedHit.h:203
std::vector< PeptideHit::PeakAnnotation > fragment_annotations
Definition NuXLAnnotatedHit.h:207
SignedSize peptide_mod_index
Definition NuXLAnnotatedHit.h:27
float pl_pc_MIC
Definition NuXLAnnotatedHit.h:149
Size NA_mod_index
Definition NuXLAnnotatedHit.h:28
float immonium_score
Definition NuXLAnnotatedHit.h:98
float total_MIC
Definition NuXLAnnotatedHit.h:180
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