OpenMS  2.4.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-2018.
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 
84  ~ReactionMonitoringTransition() override;
86 
89 
93  void setName(const String & name);
94 
95  const String & getName() const;
96 
97  void setNativeID(const String & name);
98 
99  const String & getNativeID() const;
100 
101  void setPeptideRef(const String & peptide_ref);
102 
103  const String & getPeptideRef() const;
104 
105  void setCompoundRef(const String & compound_ref);
106 
107  const String & getCompoundRef() const;
108 
110  void setPrecursorMZ(double mz);
111 
113  double getPrecursorMZ() const;
114 
116  bool hasPrecursorCVTerms() const;
117 
118  void setPrecursorCVTermList(const CVTermList & list);
119 
120  void addPrecursorCVTerm(const CVTerm & cv_term);
121 
122  /* @brief Obtain the list of CV Terms for the precursor
123  *
124  * @note You first need to check whether they exist using hasPrecursorCVTerms()
125  */
126  const CVTermList & getPrecursorCVTermList() const;
127 
128  void setProductMZ(double mz);
129 
130  double getProductMZ() const;
131 
132  int getProductChargeState() const;
133 
134  bool isProductChargeStateSet() const;
135 
136  void addProductCVTerm(const CVTerm & cv_term);
137 
138  const std::vector<Product> & getIntermediateProducts() const;
139 
140  void addIntermediateProduct(Product product);
141 
142  void setIntermediateProducts(const std::vector<Product> & products);
143 
144  void setProduct(Product product);
145 
146  const Product & getProduct() const;
147 
149  bool hasPrediction() const;
150 
151  void setPrediction(const Prediction & prediction);
152 
153  void addPredictionTerm(const CVTerm & prediction);
154 
155  /* @brief Obtain the Prediction object
156  *
157  * @note You first need to check whether the object is accessible using hasPrediction()
158  */
159  const Prediction & getPrediction() const;
160 
162  DecoyTransitionType getDecoyTransitionType() const;
163 
165  void setDecoyTransitionType(const DecoyTransitionType & d);
166 
168  double getLibraryIntensity() const;
169 
171  void setLibraryIntensity(double intensity);
172 
191  void setRetentionTime(RetentionTime rt);
192 
200  const RetentionTime & getRetentionTime() const;
201 
203 
219  bool isDetectingTransition() const;
220 
221  void setDetectingTransition(bool val);
223 
237  bool isIdentifyingTransition() const;
238 
239  void setIdentifyingTransition(bool val);
241 
254  bool isQuantifyingTransition() const;
255 
256  void setQuantifyingTransition(bool val);
258 
260 
264  bool operator==(const ReactionMonitoringTransition & rhs) const;
266 
268  bool operator!=(const ReactionMonitoringTransition & rhs) const;
270 
276  struct ProductMZLess :
278  std::binary_function<ReactionMonitoringTransition, ReactionMonitoringTransition, bool>
279  {
280  inline bool operator()(ReactionMonitoringTransition const & left, ReactionMonitoringTransition const & right) const
281  {
282  return left.getProductMZ() < right.getProductMZ();
283  }
284 
285  };
287 
288 protected:
289 
290  void updateMembers_();
291 
295 
297 
298  // attributes to a peptide / compound (optional)
301 
304 
308 
312 
313  // Precursor
314  // Product
315  // IntermediateProduct
316  // RetentionTime
317  // Prediction
318  // cvparam / userParam
319 
322 
325 
328 
330  std::vector<Product> intermediate_products_;
331 
334 
337 
340  std::bitset<3> transition_flags_;
342  };
343 }
344 
DecoyTransitionType decoy_type_
specific properties of a transition (e.g. specific CV terms)
Definition: ReactionMonitoringTransition.h:306
RetentionTime rts
Information about predicted or calibrated retention time (optional)
Definition: ReactionMonitoringTransition.h:333
A more convenient string class.
Definition: String.h:58
TargetedExperimentHelper::Prediction Prediction
Definition: ReactionMonitoringTransition.h:65
Representation of controlled vocabulary term list.
Definition: CVTermList.h:52
Target transition.
Definition: ReactionMonitoringTransition.h:70
Product meta information.
Definition: Product.h:48
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
bool operator()(ReactionMonitoringTransition const &left, ReactionMonitoringTransition const &right) const
Definition: ReactionMonitoringTransition.h:280
DecoyTransitionType
Definition: ReactionMonitoringTransition.h:67
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
CVTermList * precursor_cv_terms_
(Other) CV Terms of the Precursor (Q1) of the transition or target
Definition: ReactionMonitoringTransition.h:324
double precursor_mz_
A transition has exactly one precursor and it must supply the CV Term 1000827 (isolation window targe...
Definition: ReactionMonitoringTransition.h:321
TargetedExperimentHelper::Configuration Configuration
Definition: ReactionMonitoringTransition.h:62
Definition: TargetedExperimentHelper.h:64
Represents a product ion.
Definition: TargetedExperimentHelper.h:754
std::bitset< 3 > transition_flags_
Definition: ReactionMonitoringTransition.h:340
String peptide_ref_
Reference to a specific peptide.
Definition: ReactionMonitoringTransition.h:299
TargetedExperimentHelper::RetentionTime RetentionTime
Definition: ReactionMonitoringTransition.h:63
Representation of controlled vocabulary term.
Definition: CVTerm.h:52
String name_
id, required attribute
Definition: ReactionMonitoringTransition.h:296
Product product_
Product (Q3) of the transition.
Definition: ReactionMonitoringTransition.h:327
bool operator!=(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:824
double library_intensity_
Intensity of the product (q3) ion (stored in CV Term 1001226 inside the <Transition> tag) ...
Definition: ReactionMonitoringTransition.h:303
String compound_ref_
Reference to a specific compound.
Definition: ReactionMonitoringTransition.h:300
Unknown type.
Definition: ReactionMonitoringTransition.h:69
This class stores a retention time structure that is used in TargetedExperiment (representing a TraML...
Definition: TargetedExperimentHelper.h:152
Definition: TargetedExperimentHelper.h:628
std::vector< Product > intermediate_products_
Intermediate product ion information of the transition when using MS3 or above (optional) ...
Definition: ReactionMonitoringTransition.h:330
TargetedExperimentHelper::TraMLProduct Product
Definition: ReactionMonitoringTransition.h:64
This class stores a SRM/MRM transition.
Definition: ReactionMonitoringTransition.h:56
Prediction * prediction_
Information about a prediction for a suitable transition using some software (optional) ...
Definition: ReactionMonitoringTransition.h:336