OpenMS
Loading...
Searching...
No Matches
MRMFeatureQC.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Douglas McCloskey $
6// $Authors: Douglas McCloskey $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12
13#include <map>
14
15namespace OpenMS
16{
17
57 class OPENMS_DLLAPI MRMFeatureQC
58 {
59
60public:
61
63
64 MRMFeatureQC() = default;
65
67 ~MRMFeatureQC() = default;
69
70 // Members
71 //
79 {
80 bool operator==(const ComponentQCs& other) const {
81 bool members_eq =
82 std::tie(
83 component_name,
84 retention_time_l,
85 retention_time_u,
86 intensity_l,
87 intensity_u,
88 overall_quality_l,
89 overall_quality_u
90 ) == std::tie(
91 other.component_name,
92 other.retention_time_l,
93 other.retention_time_u,
94 other.intensity_l,
95 other.intensity_u,
98 );
99 auto compare_maps = [](std::pair<std::string, std::pair<double, double>> lhs, std::pair<std::string, std::pair<double, double>> rhs) {return (lhs.first == rhs.first && lhs.second.first == rhs.second.first && lhs.second.second == rhs.second.second); };
100 bool meta_values_eq = std::equal(meta_value_qc.begin(), meta_value_qc.end(), other.meta_value_qc.begin(), compare_maps);
101 return members_eq && meta_values_eq;
102 }
103 bool operator!=(const ComponentQCs& other) const
104 {
105 return !(*this == other);
106 }
107
109 std::string component_name;
110
111 // Feature members
113 double retention_time_l { 0.0 };
115 double retention_time_u { 1e12 };
117 double intensity_l { 0.0 };
119 double intensity_u { 1e12 };
121 double overall_quality_l { 0.0 };
123 double overall_quality_u { 1e12 };
124
126 std::map<std::string,std::pair<double,double>> meta_value_qc;
127
128 };
129
137 {
138 bool operator==(const ComponentGroupQCs& other) const {
139 bool members_eq =
140 std::tie(
141 component_group_name,
142 retention_time_l,
143 retention_time_u,
144 intensity_l,
145 intensity_u,
146 overall_quality_l,
147 overall_quality_u,
148 n_heavy_l,
149 n_heavy_u,
150 n_light_l,
151 n_light_u,
152 n_detecting_l,
153 n_detecting_u,
154 n_quantifying_l,
155 n_quantifying_u,
156 n_identifying_l,
157 n_identifying_u,
158 n_transitions_l,
159 n_transitions_u,
160 ion_ratio_pair_name_1,
161 ion_ratio_pair_name_2,
162 ion_ratio_l,
163 ion_ratio_u,
164 ion_ratio_feature_name
165 ) == std::tie(
167 other.retention_time_l,
168 other.retention_time_u,
169 other.intensity_l,
170 other.intensity_u,
171 other.overall_quality_l,
172 other.overall_quality_u,
173 other.n_heavy_l,
174 other.n_heavy_u,
175 other.n_light_l,
176 other.n_light_u,
177 other.n_detecting_l,
178 other.n_detecting_u,
179 other.n_quantifying_l,
180 other.n_quantifying_u,
181 other.n_identifying_l,
182 other.n_identifying_u,
183 other.n_transitions_l,
184 other.n_transitions_u,
187 other.ion_ratio_l,
188 other.ion_ratio_u,
190 );
191 auto compare_maps = [](std::pair<std::string, std::pair<double, double>> lhs, std::pair<std::string, std::pair<double, double>> rhs) {return (lhs.first == rhs.first && lhs.second.first == rhs.second.first && lhs.second.second == rhs.second.second); };
192 bool meta_values_eq = std::equal(meta_value_qc.begin(), meta_value_qc.end(), other.meta_value_qc.begin(), compare_maps);
193 return members_eq && meta_values_eq;
194 }
195 bool operator!=(const ComponentGroupQCs& other) const
196 {
197 return !(*this == other);
198 }
201
203 double retention_time_l { 0.0 };
205 double retention_time_u { 1e12 };
207 double intensity_l { 0.0 };
209 double intensity_u { 1e12 };
211 double overall_quality_l { 0.0 };
213 double overall_quality_u { 1e12 };
214
215 // number of transitions and labels
217 Int n_heavy_l { 0 };
219 Int n_heavy_u { 100 };
220 Int n_light_l { 0 };
221 Int n_light_u { 100 };
222 Int n_detecting_l { 0 };
223 Int n_detecting_u { 100 };
224 Int n_quantifying_l { 0 };
225 Int n_quantifying_u { 100 };
226 Int n_identifying_l { 0 };
227 Int n_identifying_u { 100 };
228 Int n_transitions_l { 0 };
229 Int n_transitions_u { 100 };
230
231 // Ion Ratio QCs
234 double ion_ratio_l { 0.0 };
235 double ion_ratio_u { 1e12 };
237 std::map<std::string,std::pair<double,double>> meta_value_qc;
238
239 };
240
249 {
250
260 double rt_diff_l;
262 double rt_diff_u;
263 };
264
265 //members
267 std::vector<ComponentQCs> component_qcs;
269 std::vector<ComponentGroupQCs> component_group_qcs;
271 std::vector<ComponentGroupPairQCs> component_group_pair_qcs;
272 };
273}
274
275
The MRMFeatureQC is a class to handle the parameters and options for MRMFeatureFilter.
Definition MRMFeatureQC.h:58
~MRMFeatureQC()=default
Destructor.
std::vector< ComponentQCs > component_qcs
list of all component QCs
Definition MRMFeatureQC.h:267
double rt_diff_l
retention time lower bound
Definition MRMFeatureQC.h:260
std::string resolution_pair_name
name of the component to calculate the resolution or retention time
Definition MRMFeatureQC.h:254
double resolution_l
resolution lower bound
Definition MRMFeatureQC.h:256
std::vector< ComponentGroupPairQCs > component_group_pair_qcs
list of all component group pair QCs
Definition MRMFeatureQC.h:271
MRMFeatureQC()=default
Constructor.
std::string component_group_name
name of the component
Definition MRMFeatureQC.h:252
std::vector< ComponentGroupQCs > component_group_qcs
list of all component group QCs
Definition MRMFeatureQC.h:269
double resolution_u
resolution upper bound
Definition MRMFeatureQC.h:258
double rt_diff_u
retention time upper bound
Definition MRMFeatureQC.h:262
Quality Controls (QCs) for multiple components (between or within component_groups)
Definition MRMFeatureQC.h:249
int Int
Signed integer type.
Definition Types.h:72
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Quality Controls (QCs) within a component group.
Definition MRMFeatureQC.h:137
std::string ion_ratio_pair_name_1
Definition MRMFeatureQC.h:232
double ion_ratio_u
Definition MRMFeatureQC.h:235
bool operator==(const ComponentGroupQCs &other) const
Definition MRMFeatureQC.h:138
Int n_light_u
Definition MRMFeatureQC.h:221
Int n_light_l
Definition MRMFeatureQC.h:220
bool operator!=(const ComponentGroupQCs &other) const
Definition MRMFeatureQC.h:195
double intensity_u
intensity upper bound
Definition MRMFeatureQC.h:209
Int n_transitions_l
Definition MRMFeatureQC.h:228
Int n_heavy_l
number of heavy ion lower bound
Definition MRMFeatureQC.h:217
double ion_ratio_l
Definition MRMFeatureQC.h:234
Int n_identifying_l
Definition MRMFeatureQC.h:226
double retention_time_l
retention time lower bound
Definition MRMFeatureQC.h:203
double overall_quality_l
overall quality lower bound
Definition MRMFeatureQC.h:211
Int n_identifying_u
Definition MRMFeatureQC.h:227
Int n_quantifying_l
Definition MRMFeatureQC.h:224
std::string ion_ratio_pair_name_2
Definition MRMFeatureQC.h:233
std::string ion_ratio_feature_name
Definition MRMFeatureQC.h:236
Int n_quantifying_u
Definition MRMFeatureQC.h:225
std::string component_group_name
name of the component group
Definition MRMFeatureQC.h:200
Int n_detecting_u
Definition MRMFeatureQC.h:223
double retention_time_u
retention time upper bound
Definition MRMFeatureQC.h:205
std::map< std::string, std::pair< double, double > > meta_value_qc
Definition MRMFeatureQC.h:237
double overall_quality_u
overall quality upper bound
Definition MRMFeatureQC.h:213
Int n_heavy_u
number of heavy ion upper bound
Definition MRMFeatureQC.h:219
double intensity_l
intensity lower bound
Definition MRMFeatureQC.h:207
Int n_detecting_l
Definition MRMFeatureQC.h:222
Int n_transitions_u
Definition MRMFeatureQC.h:229
Quality Controls (QCs) for individual components.
Definition MRMFeatureQC.h:79
std::string component_name
name of the component
Definition MRMFeatureQC.h:109
double intensity_u
intensity upper bound
Definition MRMFeatureQC.h:119
bool operator==(const ComponentQCs &other) const
Definition MRMFeatureQC.h:80
double retention_time_l
retention time lower bound
Definition MRMFeatureQC.h:113
double overall_quality_l
overall quality lower bound
Definition MRMFeatureQC.h:121
double retention_time_u
retention time upper bound
Definition MRMFeatureQC.h:115
std::map< std::string, std::pair< double, double > > meta_value_qc
Feature MetaValues.
Definition MRMFeatureQC.h:126
double overall_quality_u
overall quality upper bound
Definition MRMFeatureQC.h:123
bool operator!=(const ComponentQCs &other) const
Definition MRMFeatureQC.h:103
double intensity_l
intensity lower bound
Definition MRMFeatureQC.h:117