OpenMS
ReactionMonitoringTransition.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: Timo Sachsenberg $
6 // $Authors: Andreas Bertsch $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
14 
15 #include <vector>
16 #include <bitset>
17 
18 namespace OpenMS
19 {
20 
30  class OPENMS_DLLAPI ReactionMonitoringTransition :
31  public CVTermList
32  {
33 
34 public:
35 
40 
42  {
45  DECOY
46  };
47 
53 
56 
59 
63 
66 
69 
73  void setName(const String & name);
74 
75  const String & getName() const;
76 
77  void setNativeID(const String & name);
78 
79  const String & getNativeID() const;
80 
81  void setPeptideRef(const String & peptide_ref);
82 
83  const String & getPeptideRef() const;
84 
85  void setCompoundRef(const String & compound_ref);
86 
87  const String & getCompoundRef() const;
88 
90  void setPrecursorMZ(double mz);
91 
93  double getPrecursorMZ() const;
94 
96  bool hasPrecursorCVTerms() const;
97 
98  void setPrecursorCVTermList(const CVTermList & list);
99 
100  void addPrecursorCVTerm(const CVTerm & cv_term);
101 
106  const CVTermList & getPrecursorCVTermList() const;
107 
108  void setProductMZ(double mz);
109 
110  double getProductMZ() const;
111 
112  int getProductChargeState() const;
113 
114  bool isProductChargeStateSet() const;
115 
116  void addProductCVTerm(const CVTerm & cv_term);
117 
118  const std::vector<Product> & getIntermediateProducts() const;
119 
120  void addIntermediateProduct(const Product& product);
121 
122  void setIntermediateProducts(const std::vector<Product> & products);
123 
124  void setProduct(Product product);
125 
126  const Product & getProduct() const;
127 
129  bool hasPrediction() const;
130 
131  void setPrediction(const Prediction & prediction);
132 
133  void addPredictionTerm(const CVTerm & prediction);
134 
139  const Prediction & getPrediction() const;
140 
142  DecoyTransitionType getDecoyTransitionType() const;
143 
145  void setDecoyTransitionType(const DecoyTransitionType & d);
146 
148  double getLibraryIntensity() const;
149 
151  void setLibraryIntensity(double intensity);
152 
171  void setRetentionTime(RetentionTime rt);
172 
180  const RetentionTime & getRetentionTime() const;
181 
183 
199  bool isDetectingTransition() const;
200 
201  void setDetectingTransition(bool val);
203 
217  bool isIdentifyingTransition() const;
218 
219  void setIdentifyingTransition(bool val);
221 
234  bool isQuantifyingTransition() const;
235 
236  void setQuantifyingTransition(bool val);
238 
240 
245  bool operator==(const ReactionMonitoringTransition & rhs) const;
246 
248  bool operator!=(const ReactionMonitoringTransition & rhs) const;
250 
258  {
259  inline bool operator()(ReactionMonitoringTransition const & left, ReactionMonitoringTransition const & right) const
260  {
261  return left.getProductMZ() < right.getProductMZ();
262  }
263  };
265 
272  struct NameLess
273  {
274  inline bool operator()(ReactionMonitoringTransition const & left, ReactionMonitoringTransition const & right) const
275  {
276  return left.getName() < right.getName();
277  }
278  };
280 
281 protected:
282 
284 
288 
290 
291  // attributes to a peptide / compound (optional)
294 
297 
301 
305 
306  // Precursor
307  // Product
308  // IntermediateProduct
309  // RetentionTime
310  // Prediction
311  // cvparam / userParam
312 
315 
318 
321 
323  std::vector<Product> intermediate_products_;
324 
327 
330 
333  std::bitset<3> transition_flags_;
335  };
336 }
337 
Representation of controlled vocabulary term list.
Definition: CVTermList.h:28
Representation of controlled vocabulary term.
Definition: CVTerm.h:27
This class stores a SRM/MRM transition.
Definition: ReactionMonitoringTransition.h:32
ReactionMonitoringTransition()
default constructor
CVTermList * precursor_cv_terms_
(Other) CV Terms of the Precursor (Q1) of the transition or target
Definition: ReactionMonitoringTransition.h:317
DecoyTransitionType
Definition: ReactionMonitoringTransition.h:42
@ TARGET
Target transition.
Definition: ReactionMonitoringTransition.h:44
@ UNKNOWN
Unknown type.
Definition: ReactionMonitoringTransition.h:43
String name_
id, required attribute
Definition: ReactionMonitoringTransition.h:289
String peptide_ref_
Reference to a specific peptide.
Definition: ReactionMonitoringTransition.h:292
Product product_
Product (Q3) of the transition.
Definition: ReactionMonitoringTransition.h:320
String compound_ref_
Reference to a specific compound.
Definition: ReactionMonitoringTransition.h:293
ReactionMonitoringTransition(ReactionMonitoringTransition &&) noexcept
Move constructor.
TargetedExperimentHelper::Configuration Configuration
Definition: ReactionMonitoringTransition.h:36
TargetedExperimentHelper::Prediction Prediction
Definition: ReactionMonitoringTransition.h:39
DecoyTransitionType decoy_type_
specific properties of a transition (e.g. specific CV terms)
Definition: ReactionMonitoringTransition.h:299
Prediction * prediction_
Information about a prediction for a suitable transition using some software (optional)
Definition: ReactionMonitoringTransition.h:329
double precursor_mz_
A transition has exactly one precursor and it must supply the CV Term 1000827 (isolation window targe...
Definition: ReactionMonitoringTransition.h:314
ReactionMonitoringTransition(const ReactionMonitoringTransition &rhs)
copy constructor
std::bitset< 3 > transition_flags_
Definition: ReactionMonitoringTransition.h:333
const String & getName() const
std::vector< Product > intermediate_products_
Intermediate product ion information of the transition when using MS3 or above (optional)
Definition: ReactionMonitoringTransition.h:323
TargetedExperimentHelper::TraMLProduct Product
Definition: ReactionMonitoringTransition.h:38
double library_intensity_
Intensity of the product (q3) ion (stored in CV Term 1001226 inside the <Transition> tag)
Definition: ReactionMonitoringTransition.h:296
TargetedExperimentHelper::RetentionTime RetentionTime
Definition: ReactionMonitoringTransition.h:37
RetentionTime rts
Information about predicted or calibrated retention time (optional)
Definition: ReactionMonitoringTransition.h:326
A more convenient string class.
Definition: String.h:34
This class stores a retention time structure that is used in TargetedExperiment (representing a TraML...
Definition: TargetedExperimentHelper.h:100
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
Comparator by name.
Definition: ReactionMonitoringTransition.h:273
bool operator()(ReactionMonitoringTransition const &left, ReactionMonitoringTransition const &right) const
Definition: ReactionMonitoringTransition.h:274
Comparator by Product ion MZ.
Definition: ReactionMonitoringTransition.h:258
bool operator()(ReactionMonitoringTransition const &left, ReactionMonitoringTransition const &right) const
Definition: ReactionMonitoringTransition.h:259
Definition: TargetedExperimentHelper.h:40
Definition: TargetedExperimentHelper.h:454
Represents a product ion.
Definition: TargetedExperimentHelper.h:547