OpenMS  2.5.0
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-2020.
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 #pragma once
36 
40 #include <OpenMS/METADATA/CVTerm.h>
45 
46 #include <vector>
47 
48 namespace OpenMS
49 {
64  class OPENMS_DLLAPI TargetedExperiment
65  {
66 public:
67 
79  typedef Residue IonType; // IonType enum of Interpretation class
80 
81  typedef std::map<String, const Protein *> ProteinReferenceMapType;
82  typedef std::map<String, const Peptide *> PeptideReferenceMapType;
83  typedef std::map<String, const Compound *> CompoundReferenceMapType;
84 
90 
93 
95  virtual ~TargetedExperiment();
97 
99  TargetedExperiment & operator=(const TargetedExperiment & rhs);
100 
104  bool operator==(const TargetedExperiment & rhs) const;
105 
106  bool operator!=(const TargetedExperiment & rhs) const;
108 
114  TargetedExperiment operator+(const TargetedExperiment & rhs) const;
115 
121  TargetedExperiment & operator+=(const TargetedExperiment & rhs);
122 
128  void clear(bool clear_meta_data);
129 
133  // cv list
134  void setCVs(const std::vector<CV> & cvs);
135 
136  const std::vector<CV> & getCVs() const;
137 
138  void addCV(const CV & cv);
139 
140  // contact list
141  void setContacts(const std::vector<Contact> & contacts);
142 
143  const std::vector<Contact> & getContacts() const;
144 
145  void addContact(const Contact & contact);
146 
147  // publication list
148  void setPublications(const std::vector<Publication> & publications);
149 
150  const std::vector<Publication> & getPublications() const;
151 
152  void addPublication(const Publication & publication);
153 
154  // target list
155  void setTargetCVTerms(const CVTermList & cv_terms);
156 
157  const CVTermList & getTargetCVTerms() const;
158 
159  void addTargetCVTerm(const CVTerm & cv_term);
160 
161  void setTargetMetaValue(const String & name, const DataValue & value);
162 
163  // instrument list
164  void setInstruments(const std::vector<Instrument> & instruments);
165 
166  const std::vector<Instrument> & getInstruments() const;
167 
168  void addInstrument(const Instrument & instrument);
169 
170  // software list
171  void setSoftware(const std::vector<Software> & software);
172 
173  const std::vector<Software> & getSoftware() const;
174 
175  void addSoftware(const Software & software);
176 
177  // protein list
178  void setProteins(const std::vector<Protein> & proteins);
179 
180  const std::vector<Protein> & getProteins() const;
181 
182  const Protein & getProteinByRef(const String & ref) const;
183 
184  bool hasProtein(const String & ref) const;
185 
186  void addProtein(const Protein & protein);
187 
188  // compound list
189  void setCompounds(const std::vector<Compound> & rhs);
190 
191  const std::vector<Compound> & getCompounds() const;
192 
193  void addCompound(const Compound & rhs);
194 
195  void setPeptides(const std::vector<Peptide> & rhs);
196 
197  const std::vector<Peptide> & getPeptides() const;
198 
199  bool hasPeptide(const String & ref) const;
200 
201  const Peptide & getPeptideByRef(const String & ref) const;
202 
203  bool hasCompound(const String & ref) const;
204 
205  const Compound & getCompoundByRef(const String & ref) const;
206 
207  void addPeptide(const Peptide & rhs);
208 
210  void setTransitions(const std::vector<ReactionMonitoringTransition> & transitions);
211 
213  const std::vector<ReactionMonitoringTransition> & getTransitions() const;
214 
216  void addTransition(const ReactionMonitoringTransition & transition);
217 
218  void setIncludeTargets(const std::vector<IncludeExcludeTarget> & targets);
219 
220  const std::vector<IncludeExcludeTarget> & getIncludeTargets() const;
221 
222  void addIncludeTarget(const IncludeExcludeTarget & target);
223 
224  void setExcludeTargets(const std::vector<IncludeExcludeTarget> & targets);
225 
226  const std::vector<IncludeExcludeTarget> & getExcludeTargets() const;
227 
228  void addExcludeTarget(const IncludeExcludeTarget & target);
229 
231  void setSourceFiles(const std::vector<SourceFile> & source_files);
232 
234  const std::vector<SourceFile> & getSourceFiles() const;
235 
237  void addSourceFile(const SourceFile & source_file);
239 
241 
242 
245  void sortTransitionsByProductMZ();
247 
257  bool containsInvalidReferences() const;
258 
259 protected:
260 
261  void createProteinReferenceMap_() const;
262 
263  void createPeptideReferenceMap_() const;
264 
265  void createCompoundReferenceMap_() const;
266 
267  std::vector<CV> cvs_;
268 
269  std::vector<Contact> contacts_;
270 
271  std::vector<Publication> publications_;
272 
273  std::vector<Instrument> instruments_;
274 
276 
277  std::vector<Software> software_;
278 
279  std::vector<Protein> proteins_;
280 
281  std::vector<Compound> compounds_;
282 
283  std::vector<Peptide> peptides_;
284 
285  std::vector<ReactionMonitoringTransition> transitions_;
286 
287  std::vector<IncludeExcludeTarget> include_targets_;
288 
289  std::vector<IncludeExcludeTarget> exclude_targets_;
290 
291  std::vector<SourceFile> source_files_;
292 
294 
296 
298 
300 
302 
304 
305  };
306 
307  namespace TargetedExperimentHelper
308  {
309  } // namespace TargetedExperimentHelper
310 
311 
312 } // namespace OpenMS
313 
OpenMS::Software
Description of the software used for processing.
Definition: Software.h:48
OpenMS::TargetedExperiment::compound_reference_map_
CompoundReferenceMapType compound_reference_map_
Definition: TargetedExperiment.h:301
OpenMS::TargetedExperiment::protein_reference_map_
ProteinReferenceMapType protein_reference_map_
Definition: TargetedExperiment.h:293
OpenMS::TargetedExperimentHelper::Instrument
Definition: TargetedExperimentHelper.h:478
OpenMS::TargetedExperiment::Interpretation
TargetedExperimentHelper::Interpretation Interpretation
Definition: TargetedExperiment.h:77
OpenMS::TargetedExperiment::include_targets_
std::vector< IncludeExcludeTarget > include_targets_
Definition: TargetedExperiment.h:287
CVTerm.h
OpenMS::TargetedExperimentHelper::Peptide
Represents a peptide (amino acid sequence)
Definition: TargetedExperimentHelper.h:370
OpenMS::TargetedExperiment::Protein
TargetedExperimentHelper::Protein Protein
Definition: TargetedExperiment.h:69
OpenMS::TargetedExperiment::protein_reference_map_dirty_
bool protein_reference_map_dirty_
Definition: TargetedExperiment.h:295
OpenMS::TargetedExperiment::Compound
TargetedExperimentHelper::Compound Compound
Definition: TargetedExperiment.h:71
OpenMS::TargetedExperimentHelper::Contact
Definition: TargetedExperimentHelper.h:444
OpenMS::TargetedExperiment::proteins_
std::vector< Protein > proteins_
Definition: TargetedExperiment.h:279
OpenMS::String
A more convenient string class.
Definition: String.h:58
KDTree::operator!=
bool operator!=(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:824
OpenMS::IncludeExcludeTarget
This class stores a SRM/MRM transition.
Definition: IncludeExcludeTarget.h:52
OpenMS::TargetedExperiment::peptide_reference_map_dirty_
bool peptide_reference_map_dirty_
Definition: TargetedExperiment.h:299
OpenMS::TargetedExperiment::IonType
Residue IonType
Definition: TargetedExperiment.h:79
ReactionMonitoringTransition.h
OpenMS::TargetedExperiment::RetentionTime
TargetedExperimentHelper::RetentionTime RetentionTime
Definition: TargetedExperiment.h:70
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::TargetedExperiment::contacts_
std::vector< Contact > contacts_
Definition: TargetedExperiment.h:269
OpenMS::TargetedExperiment::CV
TargetedExperimentHelper::CV CV
Definition: TargetedExperiment.h:68
OpenMS::TargetedExperiment::exclude_targets_
std::vector< IncludeExcludeTarget > exclude_targets_
Definition: TargetedExperiment.h:289
OpenMS::Residue
Representation of a residue.
Definition: Residue.h:61
OpenMS::DataValue
Class to hold strings, numeric values, lists of strings and lists of numeric values.
Definition: DataValue.h:56
OpenMS::TargetedExperiment::compound_reference_map_dirty_
bool compound_reference_map_dirty_
Definition: TargetedExperiment.h:303
Software.h
OpenMS::ReactionMonitoringTransition
This class stores a SRM/MRM transition.
Definition: ReactionMonitoringTransition.h:56
OpenMS::TargetedExperimentHelper::Protein
Definition: TargetedExperimentHelper.h:98
OpenMS::TargetedExperiment::instruments_
std::vector< Instrument > instruments_
Definition: TargetedExperiment.h:273
OpenMS::TargetedExperimentHelper::Prediction
Definition: TargetedExperimentHelper.h:495
OpenMS::TargetedExperiment::Publication
TargetedExperimentHelper::Publication Publication
Definition: TargetedExperiment.h:74
OpenMS::TargetedExperiment::Prediction
TargetedExperimentHelper::Prediction Prediction
Definition: TargetedExperiment.h:76
OpenMS::TargetedExperimentHelper::Compound
Represents a compound (small molecule)
Definition: TargetedExperimentHelper.h:333
OpenMS::TargetedExperiment::PeptideReferenceMapType
std::map< String, const Peptide * > PeptideReferenceMapType
Definition: TargetedExperiment.h:82
OpenMS::TargetedExperiment::Contact
TargetedExperimentHelper::Contact Contact
Definition: TargetedExperiment.h:73
OpenMS::CVTermList
Representation of controlled vocabulary term list.
Definition: CVTermList.h:52
OpenMS::TargetedExperiment::Instrument
TargetedExperimentHelper::Instrument Instrument
Definition: TargetedExperiment.h:75
OpenMS::TargetedExperimentHelper::CV
Definition: TargetedExperimentHelper.h:72
KDTree::operator==
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
CVTermList.h
OpenMS::CVTerm
Representation of controlled vocabulary term.
Definition: CVTerm.h:52
OpenMS::TargetedExperiment::peptides_
std::vector< Peptide > peptides_
Definition: TargetedExperiment.h:283
OpenMS::TargetedExperiment::transitions_
std::vector< ReactionMonitoringTransition > transitions_
Definition: TargetedExperiment.h:285
OpenMS::TargetedExperimentHelper::RetentionTime
This class stores a retention time structure that is used in TargetedExperiment (representing a TraML...
Definition: TargetedExperimentHelper.h:127
OpenMS::TargetedExperiment::peptide_reference_map_
PeptideReferenceMapType peptide_reference_map_
Definition: TargetedExperiment.h:297
OpenMS::SourceFile
Description of a file location, used to store the origin of (meta) data.
Definition: SourceFile.h:46
OpenMS::TargetedExperiment::publications_
std::vector< Publication > publications_
Definition: TargetedExperiment.h:271
OpenMS::TargetedExperimentHelper::Publication
Definition: TargetedExperimentHelper.h:461
OpenMS::TargetedExperiment::ProteinReferenceMapType
std::map< String, const Protein * > ProteinReferenceMapType
Definition: TargetedExperiment.h:81
TargetedExperimentHelper.h
OpenMS::TargetedExperiment
A description of a targeted experiment containing precursor and production ions.
Definition: TargetedExperiment.h:64
OpenMS::TargetedExperiment::source_files_
std::vector< SourceFile > source_files_
Definition: TargetedExperiment.h:291
OpenMS::TargetedExperiment::software_
std::vector< Software > software_
Definition: TargetedExperiment.h:277
SourceFile.h
OpenMS::TargetedExperiment::CompoundReferenceMapType
std::map< String, const Compound * > CompoundReferenceMapType
Definition: TargetedExperiment.h:83
OpenMS::TargetedExperiment::cvs_
std::vector< CV > cvs_
Definition: TargetedExperiment.h:267
OpenMS::TargetedExperiment::Transition
ReactionMonitoringTransition Transition
Definition: TargetedExperiment.h:78
OpenMS::TargetedExperiment::Peptide
TargetedExperimentHelper::Peptide Peptide
Definition: TargetedExperiment.h:72
OpenMS::TargetedExperiment::targets_
CVTermList targets_
Definition: TargetedExperiment.h:275
StandardTypes.h
OpenMS::TargetedExperimentHelper::Interpretation
Product ion interpretation.
Definition: TargetedExperimentHelper.h:520
IncludeExcludeTarget.h
OpenMS::TargetedExperiment::compounds_
std::vector< Compound > compounds_
Definition: TargetedExperiment.h:281