Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
TransitionExperiment.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-2016.
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: Hannes Roest $
32 // $Authors: Hannes Roest $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_DATAACCESS_TRANSITIONEXPERIMENT_H
36 #define OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_DATAACCESS_TRANSITIONEXPERIMENT_H
37 
38 #include <string>
39 #include <vector>
40 #include <map>
41 #include <boost/shared_ptr.hpp>
42 
43 #include <OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/OpenSwathAlgoConfig.h>
44 
45 namespace OpenSwath
46 {
47  struct OPENSWATHALGO_DLLAPI LightTransition
48  {
49 public:
50  std::string transition_name;
51  std::string peptide_ref;
53  double product_mz;
54  double precursor_mz;
55  int charge;
56  bool decoy;
60 
62  {
63  return charge;
64  }
65 
66  std::string getNativeID() const
67  {
68  return transition_name;
69  }
70 
71  std::string getPeptideRef() const
72  {
73  return peptide_ref;
74  }
75 
76  double getLibraryIntensity() const
77  {
78  return library_intensity;
79  }
80 
81  void setLibraryIntensity(double l)
82  {
83  library_intensity = l;
84  }
85 
86  double getProductMZ() const
87  {
88  return product_mz;
89  }
90 
91  double getPrecursorMZ() const
92  {
93  return precursor_mz;
94  }
95 
96  void setDetectingTransition (bool d)
97  {
98  detecting_transition = d;
99  }
100 
102  {
103  return detecting_transition;
104  }
105 
107  {
108  quantifying_transition = q;
109  }
110 
112  {
113  return quantifying_transition;
114  }
115 
117  {
118  identifying_transition = i;
119  }
120 
122  {
123  return identifying_transition;
124  }
125  };
126 
127  struct OPENSWATHALGO_DLLAPI LightModification
128  {
129  int location;
130  std::string unimod_id;
131  };
132 
133  struct OPENSWATHALGO_DLLAPI LightPeptide
134  {
135  double rt;
136  int charge;
137  std::string sequence;
138  std::vector<std::string> protein_refs;
139  // Peptide group label (corresponds to MS:1000893, all peptides that are isotopic forms of the same peptide should be assigned the same peptide group label)
140  std::string peptide_group_label;
141  std::string id;
142 
143  int getChargeState() const
144  {
145  return charge;
146  }
147 
148  std::vector<LightModification> modifications;
149  };
150 
151  struct OPENSWATHALGO_DLLAPI LightProtein
152  {
153  std::string id;
154  std::string sequence;
155  };
156 
157  struct OPENSWATHALGO_DLLAPI LightTargetedExperiment
158  {
159  LightTargetedExperiment() : peptide_reference_map_dirty_(true) {}
160 
164 
165  std::vector<LightTransition> transitions;
166  std::vector<LightPeptide> peptides;
167  std::vector<LightProtein> proteins;
168  std::vector<LightTransition> & getTransitions()
169  {
170  return transitions;
171  }
172 
173  std::vector<LightPeptide> & getPeptides()
174  {
175  return peptides;
176  }
177 
178  std::vector<LightProtein> & getProteins()
179  {
180  return proteins;
181  }
182 
183  const LightPeptide& getPeptideByRef(const std::string& ref)
184  {
185  if (peptide_reference_map_dirty_)
186  {
187  createPeptideReferenceMap_();
188  }
189  return *(peptide_reference_map_[ref]);
190  }
191 
192  private:
193 
195  {
196  for (size_t i = 0; i < getPeptides().size(); i++)
197  {
198  peptide_reference_map_[getPeptides()[i].id] = &getPeptides()[i];
199  }
200  peptide_reference_map_dirty_ = false;
201  }
202 
204  std::map<std::string, LightPeptide*> peptide_reference_map_;
205 
206  };
207 
208 } //end Namespace OpenSwath
209 
210 
211 #endif // OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_DATAACCESS_TRANSITIONEXPERIMENT_H
std::string getPeptideRef() const
Definition: TransitionExperiment.h:71
std::vector< LightProtein > & getProteins()
Definition: TransitionExperiment.h:178
double product_mz
Definition: TransitionExperiment.h:53
std::string id
Definition: TransitionExperiment.h:153
double library_intensity
Definition: TransitionExperiment.h:52
std::vector< LightTransition > transitions
Definition: TransitionExperiment.h:165
int getChargeState() const
Definition: TransitionExperiment.h:143
std::string peptide_group_label
Definition: TransitionExperiment.h:140
bool isQuantifyingTransition() const
Definition: TransitionExperiment.h:111
bool detecting_transition
Definition: TransitionExperiment.h:57
std::vector< LightProtein > proteins
Definition: TransitionExperiment.h:167
int getProductChargeState() const
Definition: TransitionExperiment.h:61
bool isIdentifyingTransition() const
Definition: TransitionExperiment.h:121
std::string getNativeID() const
Definition: TransitionExperiment.h:66
int charge
Definition: TransitionExperiment.h:136
double precursor_mz
Definition: TransitionExperiment.h:54
std::map< std::string, LightPeptide * > peptide_reference_map_
Definition: TransitionExperiment.h:204
bool isDetectingTransition() const
Definition: TransitionExperiment.h:101
double getPrecursorMZ() const
Definition: TransitionExperiment.h:91
bool decoy
Definition: TransitionExperiment.h:56
std::vector< LightPeptide > peptides
Definition: TransitionExperiment.h:166
void setLibraryIntensity(double l)
Definition: TransitionExperiment.h:81
void createPeptideReferenceMap_()
Definition: TransitionExperiment.h:194
Definition: TransitionExperiment.h:133
bool peptide_reference_map_dirty_
Definition: TransitionExperiment.h:203
std::string sequence
Definition: TransitionExperiment.h:154
double getProductMZ() const
Definition: TransitionExperiment.h:86
int location
Definition: TransitionExperiment.h:129
std::vector< LightTransition > & getTransitions()
Definition: TransitionExperiment.h:168
LightTransition Transition
Definition: TransitionExperiment.h:161
std::string transition_name
Definition: TransitionExperiment.h:50
Definition: MRMScoring.h:51
std::vector< std::string > protein_refs
Definition: TransitionExperiment.h:138
LightPeptide Peptide
Definition: TransitionExperiment.h:162
void setQuantifyingTransition(bool q)
Definition: TransitionExperiment.h:106
void setIdentifyingTransition(bool i)
Definition: TransitionExperiment.h:116
std::string id
Definition: TransitionExperiment.h:141
std::string peptide_ref
Definition: TransitionExperiment.h:51
LightTargetedExperiment()
Definition: TransitionExperiment.h:159
std::string unimod_id
Definition: TransitionExperiment.h:130
Definition: TransitionExperiment.h:47
std::vector< LightPeptide > & getPeptides()
Definition: TransitionExperiment.h:173
bool identifying_transition
Definition: TransitionExperiment.h:59
int charge
Definition: TransitionExperiment.h:55
void setDetectingTransition(bool d)
Definition: TransitionExperiment.h:96
double rt
Definition: TransitionExperiment.h:135
bool quantifying_transition
Definition: TransitionExperiment.h:58
Definition: TransitionExperiment.h:151
double getLibraryIntensity() const
Definition: TransitionExperiment.h:76
Definition: TransitionExperiment.h:157
std::string sequence
Definition: TransitionExperiment.h:137
std::vector< LightModification > modifications
Definition: TransitionExperiment.h:148
const LightPeptide & getPeptideByRef(const std::string &ref)
Definition: TransitionExperiment.h:183
LightProtein Protein
Definition: TransitionExperiment.h:163
Definition: TransitionExperiment.h:127

OpenMS / TOPP release 2.0.0 Documentation generated on Tue Jan 31 2017 06:39:55 using doxygen 1.8.8