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-2015.
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  std::vector<int> site_identifying_transition;
61  std::vector<std::string> site_identifying_class;
62 
64  {
65  return charge;
66  }
67 
68  std::string getNativeID() const
69  {
70  return transition_name;
71  }
72 
73  std::string getPeptideRef() const
74  {
75  return peptide_ref;
76  }
77 
78  double getLibraryIntensity() const
79  {
80  return library_intensity;
81  }
82 
83  void setLibraryIntensity(double l)
84  {
85  library_intensity = l;
86  }
87 
88  double getProductMZ() const
89  {
90  return product_mz;
91  }
92 
93  double getPrecursorMZ() const
94  {
95  return precursor_mz;
96  }
97 
98  void setDetectingTransition (bool d)
99  {
100  detecting_transition = d;
101  }
102 
104  {
105  return detecting_transition;
106  }
107 
109  {
110  quantifying_transition = q;
111  }
112 
114  {
115  return quantifying_transition;
116  }
117 
119  {
120  identifying_transition = i;
121  }
122 
124  {
125  return identifying_transition;
126  }
127 
128  void setSiteIdentifyingTransition (std::vector<int> i)
129  {
130  site_identifying_transition = i;
131  }
132 
133  std::vector<int> getSiteIdentifyingTransition() const
134  {
135  return site_identifying_transition;
136  }
137 
138  void setSiteIdentifyingClass (std::vector<std::string> i)
139  {
140  site_identifying_class = i;
141  }
142 
143  std::vector<std::string> getSiteIdentifyingClass() const
144  {
145  return site_identifying_class;
146  }
147  };
148 
149  struct OPENSWATHALGO_DLLAPI LightModification
150  {
151  int location;
152  std::string unimod_id;
153  };
154 
155  struct OPENSWATHALGO_DLLAPI LightPeptide
156  {
157  double rt;
158  int charge;
159  std::string sequence;
160  std::vector<std::string> protein_refs;
161  // 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)
162  std::string peptide_group_label;
163  std::string id;
164 
165  int getChargeState() const
166  {
167  return charge;
168  }
169 
170  std::vector<LightModification> modifications;
171  };
172 
173  struct OPENSWATHALGO_DLLAPI LightProtein
174  {
175  std::string id;
176  std::string sequence;
177  };
178 
179  struct OPENSWATHALGO_DLLAPI LightTargetedExperiment
180  {
181  LightTargetedExperiment() : peptide_reference_map_dirty_(true) {}
182 
186 
187  std::vector<LightTransition> transitions;
188  std::vector<LightPeptide> peptides;
189  std::vector<LightProtein> proteins;
190  std::vector<LightTransition> & getTransitions()
191  {
192  return transitions;
193  }
194 
195  std::vector<LightPeptide> & getPeptides()
196  {
197  return peptides;
198  }
199 
200  std::vector<LightProtein> & getProteins()
201  {
202  return proteins;
203  }
204 
205  const LightPeptide& getPeptideByRef(const std::string& ref)
206  {
207  if (peptide_reference_map_dirty_)
208  {
209  createPeptideReferenceMap_();
210  }
211  return *(peptide_reference_map_[ref]);
212  }
213 
214  private:
215 
217  {
218  for (size_t i = 0; i < getPeptides().size(); i++)
219  {
220  peptide_reference_map_[getPeptides()[i].id] = &getPeptides()[i];
221  }
222  peptide_reference_map_dirty_ = false;
223  }
224 
226  std::map<std::string, LightPeptide*> peptide_reference_map_;
227 
228  };
229 
230 } //end Namespace OpenSwath
231 
232 
233 #endif // OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_DATAACCESS_TRANSITIONEXPERIMENT_H
std::string getPeptideRef() const
Definition: TransitionExperiment.h:73
std::vector< LightProtein > & getProteins()
Definition: TransitionExperiment.h:200
double product_mz
Definition: TransitionExperiment.h:53
std::string id
Definition: TransitionExperiment.h:175
double library_intensity
Definition: TransitionExperiment.h:52
std::vector< int > site_identifying_transition
Definition: TransitionExperiment.h:60
std::vector< std::string > site_identifying_class
Definition: TransitionExperiment.h:61
std::vector< LightTransition > transitions
Definition: TransitionExperiment.h:187
int getChargeState() const
Definition: TransitionExperiment.h:165
std::string peptide_group_label
Definition: TransitionExperiment.h:162
std::vector< int > getSiteIdentifyingTransition() const
Definition: TransitionExperiment.h:133
bool isQuantifyingTransition() const
Definition: TransitionExperiment.h:113
bool detecting_transition
Definition: TransitionExperiment.h:57
std::vector< LightProtein > proteins
Definition: TransitionExperiment.h:189
int getProductChargeState() const
Definition: TransitionExperiment.h:63
bool isIdentifyingTransition() const
Definition: TransitionExperiment.h:123
std::string getNativeID() const
Definition: TransitionExperiment.h:68
int charge
Definition: TransitionExperiment.h:158
double precursor_mz
Definition: TransitionExperiment.h:54
std::map< std::string, LightPeptide * > peptide_reference_map_
Definition: TransitionExperiment.h:226
bool isDetectingTransition() const
Definition: TransitionExperiment.h:103
double getPrecursorMZ() const
Definition: TransitionExperiment.h:93
bool decoy
Definition: TransitionExperiment.h:56
std::vector< LightPeptide > peptides
Definition: TransitionExperiment.h:188
void setLibraryIntensity(double l)
Definition: TransitionExperiment.h:83
void createPeptideReferenceMap_()
Definition: TransitionExperiment.h:216
Definition: TransitionExperiment.h:155
bool peptide_reference_map_dirty_
Definition: TransitionExperiment.h:225
std::string sequence
Definition: TransitionExperiment.h:176
double getProductMZ() const
Definition: TransitionExperiment.h:88
int location
Definition: TransitionExperiment.h:151
std::vector< LightTransition > & getTransitions()
Definition: TransitionExperiment.h:190
LightTransition Transition
Definition: TransitionExperiment.h:183
std::string transition_name
Definition: TransitionExperiment.h:50
Definition: MRMScoring.h:51
std::vector< std::string > protein_refs
Definition: TransitionExperiment.h:160
LightPeptide Peptide
Definition: TransitionExperiment.h:184
void setQuantifyingTransition(bool q)
Definition: TransitionExperiment.h:108
void setIdentifyingTransition(bool i)
Definition: TransitionExperiment.h:118
std::string id
Definition: TransitionExperiment.h:163
std::string peptide_ref
Definition: TransitionExperiment.h:51
LightTargetedExperiment()
Definition: TransitionExperiment.h:181
std::string unimod_id
Definition: TransitionExperiment.h:152
void setSiteIdentifyingTransition(std::vector< int > i)
Definition: TransitionExperiment.h:128
Definition: TransitionExperiment.h:47
std::vector< LightPeptide > & getPeptides()
Definition: TransitionExperiment.h:195
bool identifying_transition
Definition: TransitionExperiment.h:59
int charge
Definition: TransitionExperiment.h:55
void setSiteIdentifyingClass(std::vector< std::string > i)
Definition: TransitionExperiment.h:138
void setDetectingTransition(bool d)
Definition: TransitionExperiment.h:98
double rt
Definition: TransitionExperiment.h:157
bool quantifying_transition
Definition: TransitionExperiment.h:58
std::vector< std::string > getSiteIdentifyingClass() const
Definition: TransitionExperiment.h:143
Definition: TransitionExperiment.h:173
double getLibraryIntensity() const
Definition: TransitionExperiment.h:78
Definition: TransitionExperiment.h:179
std::string sequence
Definition: TransitionExperiment.h:159
std::vector< LightModification > modifications
Definition: TransitionExperiment.h:170
const LightPeptide & getPeptideByRef(const std::string &ref)
Definition: TransitionExperiment.h:205
LightProtein Protein
Definition: TransitionExperiment.h:185
Definition: TransitionExperiment.h:149

OpenMS / TOPP release 2.0.0 Documentation generated on Wed Mar 30 2016 12:49:26 using doxygen 1.8.11