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 
44 
45 namespace OpenSwath
46 {
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;
57 
59  {
60  return charge;
61  }
62 
63  std::string getNativeID() const
64  {
65  return transition_name;
66  }
67 
68  std::string getPeptideRef() const
69  {
70  return peptide_ref;
71  }
72 
73  double getLibraryIntensity() const
74  {
75  return library_intensity;
76  }
77 
78  void setLibraryIntensity(double l)
79  {
80  library_intensity = l;
81  }
82 
83  double getProductMZ() const
84  {
85  return product_mz;
86  }
87 
88  double getPrecursorMZ() const
89  {
90  return precursor_mz;
91  }
92 
93  };
94 
96  {
97  int location;
98  std::string unimod_id;
99  };
100 
102  {
103  double rt;
104  int charge;
105  std::string sequence;
106  std::vector<std::string> protein_refs;
107  // 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)
108  std::string peptide_group_label;
109  std::string id;
110 
111  int getChargeState() const
112  {
113  return charge;
114  }
115 
116  std::vector<LightModification> modifications;
117  };
118 
120  {
121  std::string id;
122  std::string sequence;
123  };
124 
126  {
127  LightTargetedExperiment() : peptide_reference_map_dirty_(true) {}
128 
132 
133  std::vector<LightTransition> transitions;
134  std::vector<LightPeptide> peptides;
135  std::vector<LightProtein> proteins;
136  std::vector<LightTransition> & getTransitions()
137  {
138  return transitions;
139  }
140 
141  std::vector<LightPeptide> & getPeptides()
142  {
143  return peptides;
144  }
145 
146  std::vector<LightProtein> & getProteins()
147  {
148  return proteins;
149  }
150 
151  const LightPeptide& getPeptideByRef(const std::string& ref)
152  {
153  if (peptide_reference_map_dirty_)
154  {
155  createPeptideReferenceMap_();
156  }
157  return *(peptide_reference_map_[ref]);
158  }
159 
160  private:
161 
163  {
164  for (size_t i = 0; i < getPeptides().size(); i++)
165  {
166  peptide_reference_map_[getPeptides()[i].id] = &getPeptides()[i];
167  }
168  peptide_reference_map_dirty_ = false;
169  }
170 
172  std::map<std::string, LightPeptide*> peptide_reference_map_;
173 
174  };
175 
176 } //end Namespace OpenSwath
177 
178 
179 #endif // OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_DATAACCESS_TRANSITIONEXPERIMENT_H
std::string getPeptideRef() const
Definition: TransitionExperiment.h:68
std::vector< LightProtein > & getProteins()
Definition: TransitionExperiment.h:146
double product_mz
Definition: TransitionExperiment.h:53
std::string id
Definition: TransitionExperiment.h:121
double library_intensity
Definition: TransitionExperiment.h:52
std::vector< LightTransition > transitions
Definition: TransitionExperiment.h:133
int getChargeState() const
Definition: TransitionExperiment.h:111
std::string peptide_group_label
Definition: TransitionExperiment.h:108
std::vector< LightProtein > proteins
Definition: TransitionExperiment.h:135
int getProductChargeState() const
Definition: TransitionExperiment.h:58
std::string getNativeID() const
Definition: TransitionExperiment.h:63
int charge
Definition: TransitionExperiment.h:104
double precursor_mz
Definition: TransitionExperiment.h:54
std::map< std::string, LightPeptide * > peptide_reference_map_
Definition: TransitionExperiment.h:172
double getPrecursorMZ() const
Definition: TransitionExperiment.h:88
bool decoy
Definition: TransitionExperiment.h:56
std::vector< LightPeptide > peptides
Definition: TransitionExperiment.h:134
void setLibraryIntensity(double l)
Definition: TransitionExperiment.h:78
void createPeptideReferenceMap_()
Definition: TransitionExperiment.h:162
Definition: TransitionExperiment.h:101
bool peptide_reference_map_dirty_
Definition: TransitionExperiment.h:171
std::string sequence
Definition: TransitionExperiment.h:122
double getProductMZ() const
Definition: TransitionExperiment.h:83
int location
Definition: TransitionExperiment.h:97
std::vector< LightTransition > & getTransitions()
Definition: TransitionExperiment.h:136
LightTransition Transition
Definition: TransitionExperiment.h:129
std::string transition_name
Definition: TransitionExperiment.h:50
std::vector< std::string > protein_refs
Definition: TransitionExperiment.h:106
LightPeptide Peptide
Definition: TransitionExperiment.h:130
std::string id
Definition: TransitionExperiment.h:109
std::string peptide_ref
Definition: TransitionExperiment.h:51
LightTargetedExperiment()
Definition: TransitionExperiment.h:127
std::string unimod_id
Definition: TransitionExperiment.h:98
Definition: TransitionExperiment.h:47
std::vector< LightPeptide > & getPeptides()
Definition: TransitionExperiment.h:141
int charge
Definition: TransitionExperiment.h:55
#define OPENSWATHALGO_DLLAPI
Definition: OpenSwathAlgoConfig.h:15
double rt
Definition: TransitionExperiment.h:103
Definition: TransitionExperiment.h:119
double getLibraryIntensity() const
Definition: TransitionExperiment.h:73
Definition: TransitionExperiment.h:125
std::string sequence
Definition: TransitionExperiment.h:105
std::vector< LightModification > modifications
Definition: TransitionExperiment.h:116
const LightPeptide & getPeptideByRef(const std::string &ref)
Definition: TransitionExperiment.h:151
LightProtein Protein
Definition: TransitionExperiment.h:131
Definition: TransitionExperiment.h:95

OpenMS / TOPP release 2.0.0 Documentation generated on Wed Mar 30 2016 16:18:42 using doxygen 1.8.5