OpenMS
OpenSwathScores.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: Hannes Roest $
6 // $Authors: Hannes Roest $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/OpenMSConfig.h>
12 #include <OpenMS/CONCEPT/Types.h>
13 
15 #include <vector>
16 
17 namespace OpenMS
18 {
19 
24  struct OPENMS_DLLAPI OpenSwath_Scores_Usage
25  {
26  bool use_coelution_score_ = true;
27  bool use_shape_score_ = true;
28  bool use_rt_score_ = true;
29  bool use_library_score_ = true;
30  bool use_elution_model_score_ = true;
31  bool use_intensity_score_ = true;
32  bool use_total_xic_score_ = true;
33  bool use_total_mi_score_ = true;
34  bool use_nr_peaks_score_ = true;
35  bool use_sn_score_ = true;
36  bool use_mi_score_ = true;
37  bool use_dia_scores_ = true;
38  bool use_sonar_scores = true;
39  bool use_im_scores = true;
40  bool use_ms1_correlation = true;
41  bool use_ms1_fullscan = true;
42  bool use_ms1_mi = true;
43  bool use_uis_scores = true;
44  bool use_ionseries_scores = true;
45  bool use_ms2_isotope_scores = true;
46  bool use_peak_shape_metrics = false;
47  };
48 
57  struct OPENMS_DLLAPI OpenSwath_Scores
58  {
59  double elution_model_fit_score = 0;
60  double library_corr = 0;
61  double library_norm_manhattan = 0;
62  double library_rootmeansquare = 0;
63  double library_sangle = 0;
64  double norm_rt_score = 0;
65 
66  double isotope_correlation = 0;
67  double isotope_overlap = 0;
68  double massdev_score = 0;
69  double xcorr_coelution_score = 0;
70  double xcorr_shape_score = 0;
71 
72  double yseries_score = 0;
73  double bseries_score = 0;
74  double log_sn_score = 0;
75 
76  double weighted_coelution_score = 0;
77  double weighted_xcorr_shape = 0;
78  double weighted_massdev_score = 0;
79 
80  double ms1_xcorr_coelution_score = -1;
81  double ms1_xcorr_coelution_contrast_score = 0;
82  double ms1_xcorr_coelution_combined_score = 0;
83  double ms1_xcorr_shape_score = -1;
84  double ms1_xcorr_shape_contrast_score = 0;
85  double ms1_xcorr_shape_combined_score = 0;
86  double ms1_ppm_score = 0;
87  double ms1_isotope_correlation = 0;
88  double ms1_isotope_overlap = 0;
89  double ms1_mi_score = -1;
90  double ms1_mi_contrast_score = 0;
91  double ms1_mi_combined_score = 0;
92 
93  double sonar_sn = 0;
94  double sonar_diff = 0;
95  double sonar_trend = 0;
96  double sonar_rsq = 0;
97  double sonar_shape = 0;
98  double sonar_lag = 0;
99 
100  double im_xcorr_coelution_score = 0;
101  double im_xcorr_shape_score = 0;
102  double im_delta_score = 0;
103  double im_ms1_delta_score = 0;
104  double im_drift = 0;
105  double im_drift_weighted = 0;
106  double im_delta = -1;
107  double im_ms1_contrast_coelution = 0;
108  double im_ms1_contrast_shape = 0;
109  double im_ms1_sum_contrast_coelution = 0;
110  double im_ms1_sum_contrast_shape = 0;
111  double im_ms1_drift = 0;
112  double im_ms1_delta = -1;
113 
114  double library_manhattan = 0;
115  double library_dotprod = 0;
116  double intensity = 0;
117  double total_xic = 0;
118  double nr_peaks = 0;
119  double sn_ratio = 0;
120  double mi_score = 0;
121  double weighted_mi_score = 0;
122 
123  double rt_difference = 0;
124  double normalized_experimental_rt = 0;
125  double raw_rt_score = 0;
126 
127  double dotprod_score_dia = 0;
128  double manhatt_score_dia = 0;
129 
130  OpenSwath_Scores() = default;
131 
132  double get_quick_lda_score(double library_corr_,
133  double library_norm_manhattan_,
134  double norm_rt_score_,
135  double xcorr_coelution_score_,
136  double xcorr_shape_score_,
137  double log_sn_score_) const;
138 
149  double calculate_lda_prescore(const OpenSwath_Scores& scores) const;
150 
160 
168  double calculate_swath_lda_prescore(const OpenSwath_Scores& scores) const;
169 
170  };
171 
172  struct OPENMS_DLLAPI OpenSwath_Ind_Scores
173  {
174  int ind_num_transitions = 0;
175  std::vector<OpenMS::String> ind_transition_names;
176  std::vector<double> ind_isotope_correlation;
177  std::vector<double> ind_isotope_overlap;
178  std::vector<double> ind_massdev_score;
179  std::vector<double> ind_xcorr_coelution_score;
180  std::vector<double> ind_xcorr_shape_score;
181  std::vector<double> ind_log_sn_score;
182  std::vector<double> ind_area_intensity;
183  std::vector<double> ind_total_area_intensity;
184  std::vector<double> ind_intensity_score;
185  std::vector<double> ind_apex_intensity;
186  std::vector<double> ind_apex_position;
187  std::vector<double> ind_fwhm;
188  std::vector<double> ind_total_mi;
189  std::vector<double> ind_log_intensity;
190  std::vector<double> ind_intensity_ratio;
191  std::vector<double> ind_mi_ratio;
192  std::vector<double> ind_mi_score;
193 
194  // peak shape metrics
195  std::vector<double> ind_start_position_at_5;
196  std::vector<double> ind_end_position_at_5;
197  std::vector<double> ind_start_position_at_10;
198  std::vector<double> ind_end_position_at_10;
199  std::vector<double> ind_start_position_at_50;
200  std::vector<double> ind_end_position_at_50;
201  std::vector<double> ind_total_width;
202  std::vector<double> ind_tailing_factor;
203  std::vector<double> ind_asymmetry_factor;
204  std::vector<double> ind_slope_of_baseline;
205  std::vector<double> ind_baseline_delta_2_height;
206  std::vector<double> ind_points_across_baseline;
207  std::vector<double> ind_points_across_half_height;
208 
209  OpenSwath_Ind_Scores() = default;
210 
211  };
212 
213 }
214 
215 
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
A structure to store which scores should be used by the OpenSWATH Algorithm.
Definition: OpenSwathScores.h:25
Definition: OpenSwathScores.h:173
std::vector< double > ind_end_position_at_50
Definition: OpenSwathScores.h:200
std::vector< double > ind_asymmetry_factor
Definition: OpenSwathScores.h:203
std::vector< double > ind_isotope_overlap
Definition: OpenSwathScores.h:177
std::vector< OpenMS::String > ind_transition_names
Definition: OpenSwathScores.h:175
std::vector< double > ind_xcorr_shape_score
Definition: OpenSwathScores.h:180
std::vector< double > ind_points_across_half_height
Definition: OpenSwathScores.h:207
std::vector< double > ind_slope_of_baseline
Definition: OpenSwathScores.h:204
std::vector< double > ind_xcorr_coelution_score
Definition: OpenSwathScores.h:179
std::vector< double > ind_start_position_at_5
Definition: OpenSwathScores.h:195
std::vector< double > ind_massdev_score
Definition: OpenSwathScores.h:178
std::vector< double > ind_apex_position
Definition: OpenSwathScores.h:186
std::vector< double > ind_tailing_factor
Definition: OpenSwathScores.h:202
std::vector< double > ind_intensity_ratio
Definition: OpenSwathScores.h:190
std::vector< double > ind_start_position_at_10
Definition: OpenSwathScores.h:197
std::vector< double > ind_end_position_at_5
Definition: OpenSwathScores.h:196
std::vector< double > ind_total_width
Definition: OpenSwathScores.h:201
std::vector< double > ind_total_mi
Definition: OpenSwathScores.h:188
std::vector< double > ind_end_position_at_10
Definition: OpenSwathScores.h:198
std::vector< double > ind_log_intensity
Definition: OpenSwathScores.h:189
std::vector< double > ind_total_area_intensity
Definition: OpenSwathScores.h:183
std::vector< double > ind_apex_intensity
Definition: OpenSwathScores.h:185
std::vector< double > ind_log_sn_score
Definition: OpenSwathScores.h:181
std::vector< double > ind_mi_ratio
Definition: OpenSwathScores.h:191
std::vector< double > ind_mi_score
Definition: OpenSwathScores.h:192
std::vector< double > ind_start_position_at_50
Definition: OpenSwathScores.h:199
std::vector< double > ind_isotope_correlation
Definition: OpenSwathScores.h:176
std::vector< double > ind_fwhm
Definition: OpenSwathScores.h:187
std::vector< double > ind_points_across_baseline
Definition: OpenSwathScores.h:206
std::vector< double > ind_baseline_delta_2_height
Definition: OpenSwathScores.h:205
std::vector< double > ind_area_intensity
Definition: OpenSwathScores.h:182
std::vector< double > ind_intensity_score
Definition: OpenSwathScores.h:184
A structure to hold the different scores computed by OpenSWATH.
Definition: OpenSwathScores.h:58
double calculate_swath_lda_prescore(const OpenSwath_Scores &scores) const
A full LDA model using DIA and non-DIA scores.
double calculate_lda_single_transition(const OpenSwath_Scores &scores) const
A scoring model for peak groups with a single transition.
double calculate_lda_prescore(const OpenSwath_Scores &scores) const
A quick LDA model based non-DIA scores.
double get_quick_lda_score(double library_corr_, double library_norm_manhattan_, double norm_rt_score_, double xcorr_coelution_score_, double xcorr_shape_score_, double log_sn_score_) const