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
14
16
17namespace OpenMS
18{
19
59 class OPENMS_DLLAPI MRMFeatureQC
60 {
61
62public:
63
65
66 MRMFeatureQC() = default;
67
69 ~MRMFeatureQC() = default;
71
72 // Members
73 //
81 {
82 bool operator==(const ComponentQCs& other) const {
83 bool members_eq =
84 std::tie(
85 component_name,
86 retention_time_l,
87 retention_time_u,
88 intensity_l,
89 intensity_u,
90 overall_quality_l,
91 overall_quality_u
92 ) == std::tie(
93 other.component_name,
94 other.retention_time_l,
95 other.retention_time_u,
96 other.intensity_l,
97 other.intensity_u,
100 );
101 auto compare_maps = [](std::pair<String, std::pair<double, double>> lhs, std::pair<String, std::pair<double, double>> rhs) {return (lhs.first == rhs.first && lhs.second.first == rhs.second.first && lhs.second.second == rhs.second.second); };
102 bool meta_values_eq = std::equal(meta_value_qc.begin(), meta_value_qc.end(), other.meta_value_qc.begin(), compare_maps);
103 return members_eq && meta_values_eq;
104 }
105 bool operator!=(const ComponentQCs& other) const
106 {
107 return !(*this == other);
108 }
109
112
113 // Feature members
115 double retention_time_l { 0.0 };
117 double retention_time_u { 1e12 };
119 double intensity_l { 0.0 };
121 double intensity_u { 1e12 };
123 double overall_quality_l { 0.0 };
125 double overall_quality_u { 1e12 };
126
128 std::map<String,std::pair<double,double>> meta_value_qc;
129
130 };
131
139 {
140 bool operator==(const ComponentGroupQCs& other) const {
141 bool members_eq =
142 std::tie(
143 component_group_name,
144 retention_time_l,
145 retention_time_u,
146 intensity_l,
147 intensity_u,
148 overall_quality_l,
149 overall_quality_u,
150 n_heavy_l,
151 n_heavy_u,
152 n_light_l,
153 n_light_u,
154 n_detecting_l,
155 n_detecting_u,
156 n_quantifying_l,
157 n_quantifying_u,
158 n_identifying_l,
159 n_identifying_u,
160 n_transitions_l,
161 n_transitions_u,
162 ion_ratio_pair_name_1,
163 ion_ratio_pair_name_2,
164 ion_ratio_l,
165 ion_ratio_u,
166 ion_ratio_feature_name
167 ) == std::tie(
169 other.retention_time_l,
170 other.retention_time_u,
171 other.intensity_l,
172 other.intensity_u,
173 other.overall_quality_l,
174 other.overall_quality_u,
175 other.n_heavy_l,
176 other.n_heavy_u,
177 other.n_light_l,
178 other.n_light_u,
179 other.n_detecting_l,
180 other.n_detecting_u,
181 other.n_quantifying_l,
182 other.n_quantifying_u,
183 other.n_identifying_l,
184 other.n_identifying_u,
185 other.n_transitions_l,
186 other.n_transitions_u,
189 other.ion_ratio_l,
190 other.ion_ratio_u,
192 );
193 auto compare_maps = [](std::pair<String, std::pair<double, double>> lhs, std::pair<String, std::pair<double, double>> rhs) {return (lhs.first == rhs.first && lhs.second.first == rhs.second.first && lhs.second.second == rhs.second.second); };
194 bool meta_values_eq = std::equal(meta_value_qc.begin(), meta_value_qc.end(), other.meta_value_qc.begin(), compare_maps);
195 return members_eq && meta_values_eq;
196 }
197 bool operator!=(const ComponentGroupQCs& other) const
198 {
199 return !(*this == other);
200 }
203
205 double retention_time_l { 0.0 };
207 double retention_time_u { 1e12 };
209 double intensity_l { 0.0 };
211 double intensity_u { 1e12 };
213 double overall_quality_l { 0.0 };
215 double overall_quality_u { 1e12 };
216
217 // number of transitions and labels
219 Int n_heavy_l { 0 };
221 Int n_heavy_u { 100 };
222 Int n_light_l { 0 };
223 Int n_light_u { 100 };
224 Int n_detecting_l { 0 };
225 Int n_detecting_u { 100 };
226 Int n_quantifying_l { 0 };
227 Int n_quantifying_u { 100 };
228 Int n_identifying_l { 0 };
229 Int n_identifying_u { 100 };
230 Int n_transitions_l { 0 };
231 Int n_transitions_u { 100 };
232
233 // Ion Ratio QCs
236 double ion_ratio_l { 0.0 };
237 double ion_ratio_u { 1e12 };
239 std::map<String,std::pair<double,double>> meta_value_qc;
240
241 };
242
266
267 //members
269 std::vector<ComponentQCs> component_qcs;
271 std::vector<ComponentGroupQCs> component_group_qcs;
273 std::vector<ComponentGroupPairQCs> component_group_pair_qcs;
274 };
275}
276
277
The MRMFeatureQC is a class to handle the parameters and options for MRMFeatureFilter.
Definition MRMFeatureQC.h:60
~MRMFeatureQC()=default
Destructor.
String component_group_name
name of the component
Definition MRMFeatureQC.h:254
std::vector< ComponentQCs > component_qcs
list of all component QCs
Definition MRMFeatureQC.h:269
double rt_diff_l
retention time lower bound
Definition MRMFeatureQC.h:262
double resolution_l
resolution lower bound
Definition MRMFeatureQC.h:258
std::vector< ComponentGroupPairQCs > component_group_pair_qcs
list of all component group pair QCs
Definition MRMFeatureQC.h:273
MRMFeatureQC()=default
Constructor.
std::vector< ComponentGroupQCs > component_group_qcs
list of all component group QCs
Definition MRMFeatureQC.h:271
double resolution_u
resolution upper bound
Definition MRMFeatureQC.h:260
double rt_diff_u
retention time upper bound
Definition MRMFeatureQC.h:264
String resolution_pair_name
name of the component to calculate the resolution or retention time
Definition MRMFeatureQC.h:256
Quality Controls (QCs) for multiple components (between or within component_groups)
Definition MRMFeatureQC.h:251
A more convenient string class.
Definition String.h:34
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:139
double ion_ratio_u
Definition MRMFeatureQC.h:237
bool operator==(const ComponentGroupQCs &other) const
Definition MRMFeatureQC.h:140
Int n_light_u
Definition MRMFeatureQC.h:223
String component_group_name
name of the component group
Definition MRMFeatureQC.h:202
Int n_light_l
Definition MRMFeatureQC.h:222
bool operator!=(const ComponentGroupQCs &other) const
Definition MRMFeatureQC.h:197
double intensity_u
intensity upper bound
Definition MRMFeatureQC.h:211
Int n_transitions_l
Definition MRMFeatureQC.h:230
Int n_heavy_l
number of heavy ion lower bound
Definition MRMFeatureQC.h:219
double ion_ratio_l
Definition MRMFeatureQC.h:236
Int n_identifying_l
Definition MRMFeatureQC.h:228
double retention_time_l
retention time lower bound
Definition MRMFeatureQC.h:205
double overall_quality_l
overall quality lower bound
Definition MRMFeatureQC.h:213
Int n_identifying_u
Definition MRMFeatureQC.h:229
Int n_quantifying_l
Definition MRMFeatureQC.h:226
String ion_ratio_pair_name_2
Definition MRMFeatureQC.h:235
Int n_quantifying_u
Definition MRMFeatureQC.h:227
Int n_detecting_u
Definition MRMFeatureQC.h:225
double retention_time_u
retention time upper bound
Definition MRMFeatureQC.h:207
double overall_quality_u
overall quality upper bound
Definition MRMFeatureQC.h:215
String ion_ratio_feature_name
Definition MRMFeatureQC.h:238
std::map< String, std::pair< double, double > > meta_value_qc
Definition MRMFeatureQC.h:239
Int n_heavy_u
number of heavy ion upper bound
Definition MRMFeatureQC.h:221
double intensity_l
intensity lower bound
Definition MRMFeatureQC.h:209
Int n_detecting_l
Definition MRMFeatureQC.h:224
Int n_transitions_u
Definition MRMFeatureQC.h:231
String ion_ratio_pair_name_1
Definition MRMFeatureQC.h:234
Quality Controls (QCs) for individual components.
Definition MRMFeatureQC.h:81
String component_name
name of the component
Definition MRMFeatureQC.h:111
double intensity_u
intensity upper bound
Definition MRMFeatureQC.h:121
bool operator==(const ComponentQCs &other) const
Definition MRMFeatureQC.h:82
double retention_time_l
retention time lower bound
Definition MRMFeatureQC.h:115
double overall_quality_l
overall quality lower bound
Definition MRMFeatureQC.h:123
double retention_time_u
retention time upper bound
Definition MRMFeatureQC.h:117
double overall_quality_u
overall quality upper bound
Definition MRMFeatureQC.h:125
bool operator!=(const ComponentQCs &other) const
Definition MRMFeatureQC.h:105
std::map< String, std::pair< double, double > > meta_value_qc
Feature MetaValues.
Definition MRMFeatureQC.h:128
double intensity_l
intensity lower bound
Definition MRMFeatureQC.h:119