Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
TargetedExperiment.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-2017.
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: Andreas Bertsch $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_ANALYSIS_TARGETED_TARGETEDEXPERIMENT_H
36 #define OPENMS_ANALYSIS_TARGETED_TARGETEDEXPERIMENT_H
37 
41 #include <OpenMS/METADATA/CVTerm.h>
46 
47 #include <vector>
48 
49 namespace OpenMS
50 {
62  class OPENMS_DLLAPI TargetedExperiment
63  {
64 public:
65 
77  typedef Residue IonType; // IonType enum of Interpretation class
78 
79  typedef std::map<String, const Protein *> ProteinReferenceMapType;
80  typedef std::map<String, const Peptide *> PeptideReferenceMapType;
81  typedef std::map<String, const Compound *> CompoundReferenceMapType;
82 
88 
91 
93  virtual ~TargetedExperiment();
95 
97  TargetedExperiment & operator=(const TargetedExperiment & rhs);
98 
102  bool operator==(const TargetedExperiment & rhs) const;
103 
104  bool operator!=(const TargetedExperiment & rhs) const;
106 
112  TargetedExperiment operator+(const TargetedExperiment & rhs) const;
113 
119  TargetedExperiment & operator+=(const TargetedExperiment & rhs);
120 
126  void clear(bool clear_meta_data);
127 
131  // cv list
132  void setCVs(const std::vector<CV> & cvs);
133 
134  const std::vector<CV> & getCVs() const;
135 
136  void addCV(const CV & cv);
137 
138  // contact list
139  void setContacts(const std::vector<Contact> & contacts);
140 
141  const std::vector<Contact> & getContacts() const;
142 
143  void addContact(const Contact & contact);
144 
145  // publication list
146  void setPublications(const std::vector<Publication> & publications);
147 
148  const std::vector<Publication> & getPublications() const;
149 
150  void addPublication(const Publication & publication);
151 
152  // target list
153  void setTargetCVTerms(const CVTermList & cv_terms);
154 
155  const CVTermList & getTargetCVTerms() const;
156 
157  void addTargetCVTerm(const CVTerm & cv_term);
158 
159  void setTargetMetaValue(const String & name, const DataValue & value);
160 
161  // instrument list
162  void setInstruments(const std::vector<Instrument> & instruments);
163 
164  const std::vector<Instrument> & getInstruments() const;
165 
166  void addInstrument(const Instrument & instrument);
167 
168  // software list
169  void setSoftware(const std::vector<Software> & software);
170 
171  const std::vector<Software> & getSoftware() const;
172 
173  void addSoftware(const Software & software);
174 
175  // protein list
176  void setProteins(const std::vector<Protein> & proteins);
177 
178  const std::vector<Protein> & getProteins() const;
179 
180  const Protein & getProteinByRef(const String & ref) const;
181 
182  bool hasProtein(const String & ref) const;
183 
184  void addProtein(const Protein & protein);
185 
186  // compound list
187  void setCompounds(const std::vector<Compound> & rhs);
188 
189  const std::vector<Compound> & getCompounds() const;
190 
191  void addCompound(const Compound & rhs);
192 
193  void setPeptides(const std::vector<Peptide> & rhs);
194 
195  const std::vector<Peptide> & getPeptides() const;
196 
197  bool hasPeptide(const String & ref) const;
198 
199  const Peptide & getPeptideByRef(const String & ref) const;
200 
201  bool hasCompound(const String & ref) const;
202 
203  const Compound & getCompoundByRef(const String & ref) const;
204 
205  void addPeptide(const Peptide & rhs);
206 
208  void setTransitions(const std::vector<ReactionMonitoringTransition> & transitions);
209 
211  const std::vector<ReactionMonitoringTransition> & getTransitions() const;
212 
214  void addTransition(const ReactionMonitoringTransition & transition);
215 
216  void setIncludeTargets(const std::vector<IncludeExcludeTarget> & targets);
217 
218  const std::vector<IncludeExcludeTarget> & getIncludeTargets() const;
219 
220  void addIncludeTarget(const IncludeExcludeTarget & target);
221 
222  void setExcludeTargets(const std::vector<IncludeExcludeTarget> & targets);
223 
224  const std::vector<IncludeExcludeTarget> & getExcludeTargets() const;
225 
226  void addExcludeTarget(const IncludeExcludeTarget & target);
227 
229  void setSourceFiles(const std::vector<SourceFile> & source_files);
230 
232  const std::vector<SourceFile> & getSourceFiles() const;
233 
235  void addSourceFile(const SourceFile & source_file);
237 
239 
240 
243  void sortTransitionsByProductMZ();
245 
255  bool containsInvalidReferences();
256 
257 protected:
258 
259  void createProteinReferenceMap_() const;
260 
261  void createPeptideReferenceMap_() const;
262 
263  void createCompoundReferenceMap_() const;
264 
265  std::vector<CV> cvs_;
266 
267  std::vector<Contact> contacts_;
268 
269  std::vector<Publication> publications_;
270 
271  std::vector<Instrument> instruments_;
272 
274 
275  std::vector<Software> software_;
276 
277  std::vector<Protein> proteins_;
278 
279  std::vector<Compound> compounds_;
280 
281  std::vector<Peptide> peptides_;
282 
283  std::vector<ReactionMonitoringTransition> transitions_;
284 
285  std::vector<IncludeExcludeTarget> include_targets_;
286 
287  std::vector<IncludeExcludeTarget> exclude_targets_;
288 
289  std::vector<SourceFile> source_files_;
290 
291  mutable ProteinReferenceMapType protein_reference_map_;
292 
294 
295  mutable PeptideReferenceMapType peptide_reference_map_;
296 
298 
299  mutable CompoundReferenceMapType compound_reference_map_;
300 
302 
303  };
304 
305  namespace TargetedExperimentHelper
306  {
307  } // namespace TargetedExperimentHelper
308 
309 
310 } // namespace OpenMS
311 
312 #endif // OPENMS_ANALYSIS_TARGETED_TARGETEDEXPERIMENT_H
CVTermList targets_
Definition: TargetedExperiment.h:273
A more convenient string class.
Definition: String.h:57
std::vector< IncludeExcludeTarget > include_targets_
Definition: TargetedExperiment.h:285
Representation of controlled vocabulary term list.
Definition: CVTermList.h:53
Definition: TargetedExperimentHelper.h:437
TargetedExperimentHelper::Peptide Peptide
Definition: TargetedExperiment.h:70
ProteinReferenceMapType protein_reference_map_
Definition: TargetedExperiment.h:291
std::vector< Protein > proteins_
Definition: TargetedExperiment.h:277
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
Description of a file location, used to store the origin of (meta) data.
Definition: SourceFile.h:47
Definition: TargetedExperimentHelper.h:524
std::vector< Peptide > peptides_
Definition: TargetedExperiment.h:281
Definition: TargetedExperimentHelper.h:409
Description of the software used for processing.
Definition: Software.h:49
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Representation of a residue.
Definition: Residue.h:62
Residue IonType
Definition: TargetedExperiment.h:77
Class to hold strings, numeric values, lists of strings and lists of numeric values.
Definition: DataValue.h:57
bool peptide_reference_map_dirty_
Definition: TargetedExperiment.h:297
std::vector< SourceFile > source_files_
Definition: TargetedExperiment.h:289
std::vector< Compound > compounds_
Definition: TargetedExperiment.h:279
std::map< String, const Peptide * > PeptideReferenceMapType
Definition: TargetedExperiment.h:80
std::vector< Contact > contacts_
Definition: TargetedExperiment.h:267
std::vector< Instrument > instruments_
Definition: TargetedExperiment.h:271
TargetedExperimentHelper::Prediction Prediction
Definition: TargetedExperiment.h:74
TargetedExperimentHelper::Protein Protein
Definition: TargetedExperiment.h:67
Representation of controlled vocabulary term.
Definition: CVTerm.h:51
std::vector< CV > cvs_
Definition: TargetedExperiment.h:265
Definition: TargetedExperimentHelper.h:181
TargetedExperimentHelper::Interpretation Interpretation
Definition: TargetedExperiment.h:75
std::map< String, const Protein * > ProteinReferenceMapType
Definition: TargetedExperiment.h:79
std::map< String, const Compound * > CompoundReferenceMapType
Definition: TargetedExperiment.h:81
bool protein_reference_map_dirty_
Definition: TargetedExperiment.h:293
Definition: TargetedExperimentHelper.h:85
This class stores a SRM/MRM transition.
Definition: IncludeExcludeTarget.h:53
std::vector< ReactionMonitoringTransition > transitions_
Definition: TargetedExperiment.h:283
bool operator!=(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:824
PeptideReferenceMapType peptide_reference_map_
Definition: TargetedExperiment.h:295
std::vector< IncludeExcludeTarget > exclude_targets_
Definition: TargetedExperiment.h:287
A description of a targeted experiment containing precursor and production ions.
Definition: TargetedExperiment.h:62
Definition: TargetedExperimentHelper.h:465
Definition: TargetedExperimentHelper.h:142
TargetedExperimentHelper::Instrument Instrument
Definition: TargetedExperiment.h:73
Definition: TargetedExperimentHelper.h:493
std::vector< Software > software_
Definition: TargetedExperiment.h:275
TargetedExperimentHelper::Publication Publication
Definition: TargetedExperiment.h:72
Definition: TargetedExperimentHelper.h:111
ReactionMonitoringTransition Transition
Definition: TargetedExperiment.h:76
CompoundReferenceMapType compound_reference_map_
Definition: TargetedExperiment.h:299
bool compound_reference_map_dirty_
Definition: TargetedExperiment.h:301
TargetedExperimentHelper::Contact Contact
Definition: TargetedExperiment.h:71
TargetedExperimentHelper::Compound Compound
Definition: TargetedExperiment.h:69
std::vector< Publication > publications_
Definition: TargetedExperiment.h:269
TargetedExperimentHelper::CV CV
Definition: TargetedExperiment.h:66
Definition: TargetedExperimentHelper.h:266
This class stores a SRM/MRM transition.
Definition: ReactionMonitoringTransition.h:56
TargetedExperimentHelper::RetentionTime RetentionTime
Definition: TargetedExperiment.h:68

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:04 using doxygen 1.8.13