OpenMS  2.7.0
ReactionMonitoringTransition.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2021.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: Andreas Bertsch $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
40 
41 #include <vector>
42 #include <bitset>
43 
44 namespace OpenMS
45 {
46 
56  class OPENMS_DLLAPI ReactionMonitoringTransition :
57  public CVTermList
58  {
59 
60 public:
61 
66 
68  {
71  DECOY
72  };
73 
79 
82 
85 
89 
92 
95 
99  void setName(const String & name);
100 
101  const String & getName() const;
102 
103  void setNativeID(const String & name);
104 
105  const String & getNativeID() const;
106 
107  void setPeptideRef(const String & peptide_ref);
108 
109  const String & getPeptideRef() const;
110 
111  void setCompoundRef(const String & compound_ref);
112 
113  const String & getCompoundRef() const;
114 
116  void setPrecursorMZ(double mz);
117 
119  double getPrecursorMZ() const;
120 
122  bool hasPrecursorCVTerms() const;
123 
124  void setPrecursorCVTermList(const CVTermList & list);
125 
126  void addPrecursorCVTerm(const CVTerm & cv_term);
127 
132  const CVTermList & getPrecursorCVTermList() const;
133 
134  void setProductMZ(double mz);
135 
136  double getProductMZ() const;
137 
138  int getProductChargeState() const;
139 
140  bool isProductChargeStateSet() const;
141 
142  void addProductCVTerm(const CVTerm & cv_term);
143 
144  const std::vector<Product> & getIntermediateProducts() const;
145 
146  void addIntermediateProduct(Product product);
147 
148  void setIntermediateProducts(const std::vector<Product> & products);
149 
150  void setProduct(Product product);
151 
152  const Product & getProduct() const;
153 
155  bool hasPrediction() const;
156 
157  void setPrediction(const Prediction & prediction);
158 
159  void addPredictionTerm(const CVTerm & prediction);
160 
165  const Prediction & getPrediction() const;
166 
168  DecoyTransitionType getDecoyTransitionType() const;
169 
171  void setDecoyTransitionType(const DecoyTransitionType & d);
172 
174  double getLibraryIntensity() const;
175 
177  void setLibraryIntensity(double intensity);
178 
197  void setRetentionTime(RetentionTime rt);
198 
206  const RetentionTime & getRetentionTime() const;
207 
209 
225  bool isDetectingTransition() const;
226 
227  void setDetectingTransition(bool val);
229 
243  bool isIdentifyingTransition() const;
244 
245  void setIdentifyingTransition(bool val);
247 
260  bool isQuantifyingTransition() const;
261 
262  void setQuantifyingTransition(bool val);
264 
266 
271  bool operator==(const ReactionMonitoringTransition & rhs) const;
272 
274  bool operator!=(const ReactionMonitoringTransition & rhs) const;
276 
284  {
285  inline bool operator()(ReactionMonitoringTransition const & left, ReactionMonitoringTransition const & right) const
286  {
287  return left.getProductMZ() < right.getProductMZ();
288  }
289  };
291 
298  struct NameLess
299  {
300  inline bool operator()(ReactionMonitoringTransition const & left, ReactionMonitoringTransition const & right) const
301  {
302  return left.getName() < right.getName();
303  }
304  };
306 
307 protected:
308 
310 
314 
316 
317  // attributes to a peptide / compound (optional)
320 
323 
327 
331 
332  // Precursor
333  // Product
334  // IntermediateProduct
335  // RetentionTime
336  // Prediction
337  // cvparam / userParam
338 
341 
344 
347 
349  std::vector<Product> intermediate_products_;
350 
353 
356 
359  std::bitset<3> transition_flags_;
361  };
362 }
363 
Representation of controlled vocabulary term list.
Definition: CVTermList.h:54
Representation of controlled vocabulary term.
Definition: CVTerm.h:53
This class stores a SRM/MRM transition.
Definition: ReactionMonitoringTransition.h:58
ReactionMonitoringTransition()
default constructor
CVTermList * precursor_cv_terms_
(Other) CV Terms of the Precursor (Q1) of the transition or target
Definition: ReactionMonitoringTransition.h:343
DecoyTransitionType
Definition: ReactionMonitoringTransition.h:68
@ TARGET
Target transition.
Definition: ReactionMonitoringTransition.h:70
@ UNKNOWN
Unknown type.
Definition: ReactionMonitoringTransition.h:69
String name_
id, required attribute
Definition: ReactionMonitoringTransition.h:315
String peptide_ref_
Reference to a specific peptide.
Definition: ReactionMonitoringTransition.h:318
Product product_
Product (Q3) of the transition.
Definition: ReactionMonitoringTransition.h:346
String compound_ref_
Reference to a specific compound.
Definition: ReactionMonitoringTransition.h:319
ReactionMonitoringTransition(ReactionMonitoringTransition &&) noexcept
Move constructor.
TargetedExperimentHelper::Configuration Configuration
Definition: ReactionMonitoringTransition.h:62
TargetedExperimentHelper::Prediction Prediction
Definition: ReactionMonitoringTransition.h:65
DecoyTransitionType decoy_type_
specific properties of a transition (e.g. specific CV terms)
Definition: ReactionMonitoringTransition.h:325
Prediction * prediction_
Information about a prediction for a suitable transition using some software (optional)
Definition: ReactionMonitoringTransition.h:355
double precursor_mz_
A transition has exactly one precursor and it must supply the CV Term 1000827 (isolation window targe...
Definition: ReactionMonitoringTransition.h:340
ReactionMonitoringTransition(const ReactionMonitoringTransition &rhs)
copy constructor
std::bitset< 3 > transition_flags_
Definition: ReactionMonitoringTransition.h:359
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:349
TargetedExperimentHelper::TraMLProduct Product
Definition: ReactionMonitoringTransition.h:64
double library_intensity_
Intensity of the product (q3) ion (stored in CV Term 1001226 inside the <Transition> tag)
Definition: ReactionMonitoringTransition.h:322
TargetedExperimentHelper::RetentionTime RetentionTime
Definition: ReactionMonitoringTransition.h:63
RetentionTime rts
Information about predicted or calibrated retention time (optional)
Definition: ReactionMonitoringTransition.h:352
A more convenient string class.
Definition: String.h:61
This class stores a retention time structure that is used in TargetedExperiment (representing a TraML...
Definition: TargetedExperimentHelper.h:126
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Comparator by name.
Definition: ReactionMonitoringTransition.h:299
bool operator()(ReactionMonitoringTransition const &left, ReactionMonitoringTransition const &right) const
Definition: ReactionMonitoringTransition.h:300
Comparator by Product ion MZ.
Definition: ReactionMonitoringTransition.h:284
bool operator()(ReactionMonitoringTransition const &left, ReactionMonitoringTransition const &right) const
Definition: ReactionMonitoringTransition.h:285
Definition: TargetedExperimentHelper.h:66
Definition: TargetedExperimentHelper.h:480
Represents a product ion.
Definition: TargetedExperimentHelper.h:573