OpenMS  3.0.0
NuXLAnnotatedHit.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2020.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: Timo Sachsenberg $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
38 #include <OpenMS/METADATA/PeptideHit.h> // for PeakAnnotation
40 
41 namespace OpenMS
42 {
46 {
47  public:
48  /*
49  Slim indices/views to lookup the actual sequence
50  */
52  SignedSize peptide_mod_index = 0; // enumeration index of the non-NA peptide modification
53  Size NA_mod_index = 0; // index of the NA modification
54  Size NA_adduct_amb_index = 0; // store index the entry in the set of ambiguous precursor adducts (e.g, C-NH3 vs. U-H2O)
55 
56  int isotope_error = 0; // wheter the hit has been matched with isotopic misassignment
57 
58  static constexpr const char UNKNOWN_NUCLEOTIDE = '?';
60 
86  float score = 0;
87 
94  float mass_error_p = 0;
95 
96  //
97  // Scores exclusively calculated from peaks without nucleotide shifts:
98  //
99 
104  float total_loss_score = 0;
105 
123  float immonium_score = 0;
124  float precursor_score = 0;
125 
130  float MIC = 0;
131  float err = 0;
132  float Morph = 0;
133 
137  float modds = 0;
138 
139  //
140  // Scores exclusively calculated from nucleotide shifted peaks:
141  //
142 
154 
160  float pl_MIC = 0;
161  float pl_err = 0.0;
162  float pl_Morph = 0;
163 
164  /*
165  The match odds (-log10) of observing this number of b-,a-, and y-ions with nucleotide shifts assuming a uniform distribution of noise peaks.
166  */
167  float pl_modds = 0;
168 
169  /*
170  The MIC of precursor with all nucleotide shifts.
171  Three variants: No additional loss, loss of water, and loss ammonia.
172  Charge states considered: 1..N (precursor charge)
173  */
174  float pl_pc_MIC = 0;
175 
194  float pl_im_MIC = 0;
195 
196  //
197  // Scores calculated from peaks with AND without nucleotide shifts:
198  //
199 
205  float total_MIC = 0;
206 
210  float marker_ions_score = 0;
211 
218  float ladder_score = 0;
226  float sequence_score = 0;
227 
231  int best_localization_position = -1; // UNKNOWN
232  std::vector<PeptideHit::PeakAnnotation> fragment_annotations;
233 
234  size_t tag_unshifted = 0;
235  size_t tag_shifted = 0;
236  size_t tag_XLed = 0; // tag that contains the transition from unshifted to shifted
237 
240  double wTop50 = 0;
241 
243 
244  static bool hasBetterScore(const NuXLAnnotatedHit& a, const NuXLAnnotatedHit& b)
245  {
246  return a.score > b.score;
247  }
248 };
249 }
250 
float Morph
Definition: NuXLAnnotatedHit.h:132
A more convenient string class.
Definition: String.h:58
float modds
Definition: NuXLAnnotatedHit.h:137
float total_loss_score
Definition: NuXLAnnotatedHit.h:104
int best_localization_position
Definition: NuXLAnnotatedHit.h:231
static bool hasBetterScore(const NuXLAnnotatedHit &a, const NuXLAnnotatedHit &b)
Definition: NuXLAnnotatedHit.h:244
SignedSize peptide_mod_index
Definition: NuXLAnnotatedHit.h:52
float total_MIC
Definition: NuXLAnnotatedHit.h:205
float immonium_score
Definition: NuXLAnnotatedHit.h:123
String best_localization
Definition: NuXLAnnotatedHit.h:230
float sequence_score
Definition: NuXLAnnotatedHit.h:226
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition: Types.h:134
size_t tag_shifted
Definition: NuXLAnnotatedHit.h:235
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
float mass_error_p
Definition: NuXLAnnotatedHit.h:94
double explained_peak_fraction
Definition: NuXLAnnotatedHit.h:238
float ladder_score
Definition: NuXLAnnotatedHit.h:218
char cross_linked_nucleotide
Definition: NuXLAnnotatedHit.h:59
float pl_pc_MIC
Definition: NuXLAnnotatedHit.h:174
Definition: NuXLAnnotatedHit.h:45
float pl_modds
Definition: NuXLAnnotatedHit.h:167
std::vector< PeptideHit::PeakAnnotation > fragment_annotations
Definition: NuXLAnnotatedHit.h:232
float pl_err
Definition: NuXLAnnotatedHit.h:161
float pl_Morph
Definition: NuXLAnnotatedHit.h:162
double wTop50
Definition: NuXLAnnotatedHit.h:240
float precursor_score
Definition: NuXLAnnotatedHit.h:124
float err
Definition: NuXLAnnotatedHit.h:131
float pl_im_MIC
Definition: NuXLAnnotatedHit.h:194
size_t n_theoretical_peaks
Definition: NuXLAnnotatedHit.h:242
Size NA_adduct_amb_index
Definition: NuXLAnnotatedHit.h:54
String localization_scores
Definition: NuXLAnnotatedHit.h:229
size_t tag_XLed
Definition: NuXLAnnotatedHit.h:236
float best_localization_score
Definition: NuXLAnnotatedHit.h:228
size_t tag_unshifted
Definition: NuXLAnnotatedHit.h:234
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
static constexpr const char UNKNOWN_NUCLEOTIDE
Definition: NuXLAnnotatedHit.h:58
StringView sequence
Definition: NuXLAnnotatedHit.h:51
float partial_loss_score
Definition: NuXLAnnotatedHit.h:153
float score
Definition: NuXLAnnotatedHit.h:86
Size NA_mod_index
Definition: NuXLAnnotatedHit.h:53
float pl_MIC
Definition: NuXLAnnotatedHit.h:160
float MIC
Definition: NuXLAnnotatedHit.h:130
float marker_ions_score
Definition: NuXLAnnotatedHit.h:210
StringView provides a non-owning view on an existing string.
Definition: StringView.h:55
int isotope_error
Definition: NuXLAnnotatedHit.h:56
double matched_theo_fraction
Definition: NuXLAnnotatedHit.h:239