OpenMS
OpenSwathScores.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: 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  };
47 
56  struct OPENMS_DLLAPI OpenSwath_Scores
57  {
58  double elution_model_fit_score = 0;
59  double library_corr = 0;
60  double library_norm_manhattan = 0;
61  double library_rootmeansquare = 0;
62  double library_sangle = 0;
63  double norm_rt_score = 0;
64 
65  double isotope_correlation = 0;
66  double isotope_overlap = 0;
67  double massdev_score = 0;
68  double xcorr_coelution_score = 0;
69  double xcorr_shape_score = 0;
70 
71  double yseries_score = 0;
72  double bseries_score = 0;
73  double log_sn_score = 0;
74 
75  double weighted_coelution_score = 0;
76  double weighted_xcorr_shape = 0;
77  double weighted_massdev_score = 0;
78 
79  double ms1_xcorr_coelution_score = -1;
80  double ms1_xcorr_coelution_contrast_score = 0;
81  double ms1_xcorr_coelution_combined_score = 0;
82  double ms1_xcorr_shape_score = -1;
83  double ms1_xcorr_shape_contrast_score = 0;
84  double ms1_xcorr_shape_combined_score = 0;
85  double ms1_ppm_score = 0;
86  double ms1_isotope_correlation = 0;
87  double ms1_isotope_overlap = 0;
88  double ms1_mi_score = -1;
89  double ms1_mi_contrast_score = 0;
90  double ms1_mi_combined_score = 0;
91 
92  double sonar_sn = 0;
93  double sonar_diff = 0;
94  double sonar_trend = 0;
95  double sonar_rsq = 0;
96  double sonar_shape = 0;
97  double sonar_lag = 0;
98 
99  double im_xcorr_coelution_score = 0;
100  double im_xcorr_shape_score = 0;
101  double im_delta_score = 0;
102  double im_ms1_delta_score = 0;
103  double im_drift = 0;
104  double im_drift_weighted = 0;
105  double im_delta = -1;
106  double im_ms1_contrast_coelution = 0;
107  double im_ms1_contrast_shape = 0;
108  double im_ms1_sum_contrast_coelution = 0;
109  double im_ms1_sum_contrast_shape = 0;
110  double im_ms1_drift = 0;
111  double im_ms1_delta = -1;
112 
113  double library_manhattan = 0;
114  double library_dotprod = 0;
115  double intensity = 0;
116  double total_xic = 0;
117  double nr_peaks = 0;
118  double sn_ratio = 0;
119  double mi_score = 0;
120  double weighted_mi_score = 0;
121 
122  double rt_difference = 0;
123  double normalized_experimental_rt = 0;
124  double raw_rt_score = 0;
125 
126  double dotprod_score_dia = 0;
127  double manhatt_score_dia = 0;
128 
129  OpenSwath_Scores() = default;
130 
131  double get_quick_lda_score(double library_corr_,
132  double library_norm_manhattan_,
133  double norm_rt_score_,
134  double xcorr_coelution_score_,
135  double xcorr_shape_score_,
136  double log_sn_score_) const;
137 
148  double calculate_lda_prescore(const OpenSwath_Scores& scores) const;
149 
159 
167  double calculate_swath_lda_prescore(const OpenSwath_Scores& scores) const;
168 
169  };
170 
171  struct OPENMS_DLLAPI OpenSwath_Ind_Scores
172  {
173  int ind_num_transitions = 0;
174  std::vector<OpenMS::String> ind_transition_names;
175  std::vector<double> ind_isotope_correlation;
176  std::vector<double> ind_isotope_overlap;
177  std::vector<double> ind_massdev_score;
178  std::vector<double> ind_xcorr_coelution_score;
179  std::vector<double> ind_xcorr_shape_score;
180  std::vector<double> ind_log_sn_score;
181  std::vector<double> ind_area_intensity;
182  std::vector<double> ind_total_area_intensity;
183  std::vector<double> ind_intensity_score;
184  std::vector<double> ind_apex_intensity;
185  std::vector<double> ind_total_mi;
186  std::vector<double> ind_log_intensity;
187  std::vector<double> ind_intensity_ratio;
188  std::vector<double> ind_mi_ratio;
189  std::vector<double> ind_mi_score;
190 
191  OpenSwath_Ind_Scores() = default;
192 
193  };
194 
195 }
196 
197 
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
A structure to store which scores should be used by the OpenSWATH Algorithm.
Definition: OpenSwathScores.h:25
Definition: OpenSwathScores.h:172
std::vector< double > ind_isotope_overlap
Definition: OpenSwathScores.h:176
std::vector< OpenMS::String > ind_transition_names
Definition: OpenSwathScores.h:174
std::vector< double > ind_xcorr_shape_score
Definition: OpenSwathScores.h:179
std::vector< double > ind_xcorr_coelution_score
Definition: OpenSwathScores.h:178
std::vector< double > ind_massdev_score
Definition: OpenSwathScores.h:177
std::vector< double > ind_intensity_ratio
Definition: OpenSwathScores.h:187
std::vector< double > ind_total_mi
Definition: OpenSwathScores.h:185
std::vector< double > ind_log_intensity
Definition: OpenSwathScores.h:186
std::vector< double > ind_total_area_intensity
Definition: OpenSwathScores.h:182
std::vector< double > ind_apex_intensity
Definition: OpenSwathScores.h:184
std::vector< double > ind_log_sn_score
Definition: OpenSwathScores.h:180
std::vector< double > ind_mi_ratio
Definition: OpenSwathScores.h:188
std::vector< double > ind_mi_score
Definition: OpenSwathScores.h:189
std::vector< double > ind_isotope_correlation
Definition: OpenSwathScores.h:175
std::vector< double > ind_area_intensity
Definition: OpenSwathScores.h:181
std::vector< double > ind_intensity_score
Definition: OpenSwathScores.h:183
A structure to hold the different scores computed by OpenSWATH.
Definition: OpenSwathScores.h:57
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