ProteoWizard
TraData.hpp
Go to the documentation of this file.
1 //
2 // $Id: TraData.hpp 1987 2010-05-17 19:40:16Z chambm $
3 //
4 //
5 // Original author: Matt Chambers <matt.chambers .@. vanderbilt.edu>
6 //
7 // Copyright 2009 Vanderbilt University - Nashville, TN 37232
8 //
9 // Licensed under the Apache License, Version 2.0 (the "License");
10 // you may not use this file except in compliance with the License.
11 // You may obtain a copy of the License at
12 //
13 // http://www.apache.org/licenses/LICENSE-2.0
14 //
15 // Unless required by applicable law or agreed to in writing, software
16 // distributed under the License is distributed on an "AS IS" BASIS,
17 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 // See the License for the specific language governing permissions and
19 // limitations under the License.
20 //
21 
22 
23 #ifndef _TRADATA_HPP_
24 #define _TRADATA_HPP_
25 
26 
28 #include "pwiz/data/common/cv.hpp"
30 #include <vector>
31 #include <string>
32 
33 
34 namespace pwiz {
35 namespace tradata {
36 
37 
38 using namespace pwiz::data;
39 
40 
41 /// returns a default list of CVs used in an TraML document;
42 /// currently includes PSI-MS, Unit Ontology, and UNIMOD
43 PWIZ_API_DECL std::vector<CV> defaultCVList();
44 
45 
47 {
48  /// Identifier for the contact to be used for referencing within a document
49  std::string id;
50 
51  Contact(const std::string& id = "");
52 
53  /// returns true iff all members are empty and contain no params
54  bool empty() const;
55 };
56 
57 typedef boost::shared_ptr<Contact> ContactPtr;
58 
59 
61 {
62  /// Identifier for the publication to be used for referencing within a document
63  std::string id;
64 
65  /// returns true iff all members are empty and contain no params
66  bool empty() const;
67 };
68 
69 
71 {
72  /// Identifier for the software to be used for referencing within a document
73  std::string id;
74 
75  /// Version of the software program described
76  std::string version;
77 
78  Software(const std::string& _id = "");
79 
80  Software(const std::string& _id,
81  const CVParam& _param,
82  const std::string& _version);
83 
84  /// returns true iff all members are empty and contain no params
85  bool empty() const;
86 };
87 
88 typedef boost::shared_ptr<Software> SoftwarePtr;
89 
90 
92 {
93  /// Software used to determine the retention time
95 
96  /// returns true iff all members are empty and contain no params
97  bool empty() const;
98 };
99 
100 
101 /// Information about a prediction for a suitable transition using some software
103 {
104  /// Reference to a software package from which this prediction is derived
106 
107  /// Reference to a contact person that generated this prediction
109 
110  /// returns true iff all members are empty and contain no params
111  bool empty() const;
112 };
113 
114 
115 /// Information about empirical mass spectrometer observations of the peptide
117 {
118  /// returns true iff contain no params
119  bool empty() const;
120 };
121 
122 
123 /// Information about the state of validation of a transition on a given instrument model
125 {
126  /// returns true iff contain no params
127  bool empty() const;
128 };
129 
130 
131 /// Instrument on which transitions are validated
133 {
134  /// Identifier for the instrument to be used for referencing within a document
135  std::string id;
136 
137  Instrument(const std::string& id = "");
138 
139  /// returns true iff all members are empty and contain no params
140  bool empty() const;
141 };
142 
143 typedef boost::shared_ptr<Instrument> InstrumentPtr;
144 
145 
146 /// Instrument configuration used in the validation or optimization of the transitions
148 {
149  std::vector<Validation> validations;
150 
151  /// Reference to a contact person originating this information
153 
154  /// Reference to an instrument for which this configuration information is appropriate
156 
157  /// returns true iff all members are empty and contain no params
158  bool empty() const;
159 };
160 
161 
162 /// A possible interpration of the product ion for a transition
164 {
165  /// returns true iff contains no params
166  bool empty() const;
167 };
168 
169 
171 {
172  /// Identifier for the protein to be used for referencing within a document
173  std::string id;
174 
175  /// Amino acid sequence of the protein
176  std::string sequence;
177 
178  Protein(const std::string& id = "");
179 
180  /// returns true iff all members are empty and contain no params
181  bool empty() const;
182 };
183 
184 typedef boost::shared_ptr<Protein> ProteinPtr;
185 
186 
187 /// A molecule modification specification.
188 /// If n modifications are present on the peptide, there should be n instances of the modification element.
189 /// If multiple modifications are provided as cvParams, it is assumed the modification is ambiguous,
190 /// i.e. one modification or the other. If no cvParams are provided it is assumed that the delta has not been
191 /// matched to a known modification.
193 {
194  Modification();
195 
196  /// Location of the modification within the peptide sequence, counted from the N-terminus, starting at position 1. Specific modifications to the N-terminus should be given the location 0. Modification to the C-terminus should be given as peptide length + 1.
197  int location;
198 
199  /// Atomic mass delta when assuming only the most common isotope of elements in Daltons.
201 
202  /// Atomic mass delta when considering the natural distribution of isotopes in Daltons.
204 
205  /// returns true iff all members are zero and contain no params
206  bool empty() const;
207 };
208 
209 
210 /// Peptide for which one or more transitions are intended to identify
212 {
213  /// Identifier for the peptide to be used for referencing within a document
214  std::string id;
215 
216  /// Amino acid sequence of the peptide being described
217  std::string sequence;
218 
219  /// List of modifications on this peptide
220  std::vector<Modification> modifications;
221 
222  /// Reference to zero or more proteins which this peptide is intended to identify
223  std::vector<ProteinPtr> proteinPtrs;
224 
225  /// List of retention time information entries
226  std::vector<RetentionTime> retentionTimes;
227 
229 
230  Peptide(const std::string& id = "");
231 
232  /// returns true iff all members are empty and contain no params
233  bool empty() const;
234 };
235 
236 typedef boost::shared_ptr<Peptide> PeptidePtr;
237 
238 
239 /// Chemical compound other than a peptide for which one or more transitions
241 {
242  /// Identifier for the compound to be used for referencing within a document
243  std::string id;
244 
245  /// List of retention time information entries
246  std::vector<RetentionTime> retentionTimes;
247 
248  Compound(const std::string& id = "");
249 
250  /// returns true iff all members are empty and contain no params
251  bool empty() const;
252 };
253 
254 typedef boost::shared_ptr<Compound> CompoundPtr;
255 
256 
257 /// Precursor (Q1) of the transition
259 {
260  /// returns true iff contains no params
261  bool empty() const;
262 };
263 
264 
265 /// Product (Q3) of the transition
267 {
268  /// returns true iff contains no params
269  bool empty() const;
270 };
271 
272 
274 {
275  /// String label for this transition
276  std::string id;
277 
278  /// Reference to a peptide which this transition is intended to identify
280 
281  /// Reference to a compound for this transition
283 
284  /// Precursor (Q1) of the transition
286 
287  /// Product (Q3) of the transition
289 
290  /// Information about a prediction for a suitable transition using some software
292 
293  /// Information about predicted or calibrated retention time
295 
296  /// List of possible interprations of fragment ions for a transition
297  std::vector<Interpretation> interpretationList;
298 
299  /// List of insutrument configurations used in the validation or optimization of the transitions
300  std::vector<Configuration> configurationList;
301 
302  /// returns true iff all members are empty and contain no params
303  bool empty() const;
304 };
305 
306 
307 /// A peptide or compound that is to be included or excluded from a target list of precursor m/z values.
309 {
310  /// String label for this target
311  std::string id;
312 
313  /// Reference to a peptide for which this target is the trigger
315 
316  /// Reference to a compound for which this target is the trigger
318 
319  /// Precursor (Q1) of the target
321 
322  /// Information about predicted or calibrated retention time
324 
325  /// List of instrument configurations used in the validation or optimization of the target
326  std::vector<Configuration> configurationList;
327 
328  /// returns true iff all members are empty and contain no params
329  bool empty() const;
330 };
331 
332 
333 /// List of precursor m/z targets to include or exclude
335 {
336  /// List of precursor m/z targets to exclude
337  std::vector<Target> targetExcludeList;
338 
339  /// List of precursor m/z targets to include
340  std::vector<Target> targetIncludeList;
341 
342  /// returns true iff all members are empty and contain no params
343  bool empty() const;
344 };
345 
346 
347 namespace IO {struct HandlerTraData;} // forward declaration for friend
348 
349 
351 {
352  /// for internal use: not currently in the schema
353  std::string id;
354 
355  /// List of controlled vocabularies used in a TraML document
356  /// note: one of the <cv> elements in this list MUST be the PSI MS controlled vocabulary. All <cvParam> elements in the document MUST refer to one of the <cv> elements in this list.
357  std::vector<CV> cvs;
358 
359  /// List of contacts referenced in the generation or validation of transitions
360  std::vector<ContactPtr> contactPtrs;
361 
362  /// List of publications from which the transitions were collected or wherein they are published
363  std::vector<Publication> publications;
364 
365  /// List of instruments on which transitions are validated
366  std::vector<InstrumentPtr> instrumentPtrs;
367 
368  /// List of software packages used in the generation of one of more transitions described in the document
369  std::vector<SoftwarePtr> softwarePtrs;
370 
371  /// List of proteins for which one or more transitions are intended to identify
372  std::vector<ProteinPtr> proteinPtrs;
373 
374  /// List of compounds (including peptides) for which one or more transitions are intended to identify
375  std::vector<PeptidePtr> peptidePtrs;
376  std::vector<CompoundPtr> compoundPtrs;
377 
378  /// List of transitions
379  std::vector<Transition> transitions;
380 
381  /// List of precursor m/z targets to include or exclude
383 
384  /// returns true iff all members are empty
385  bool empty() const;
386 
387  /// returns the version of this traML document;
388  /// for a document created programmatically, the version is the current release version of traML;
389  /// for a document created from a file/stream, the version is the schema version read from the file/stream
390  const std::string& version() const;
391 
392  TraData();
393  virtual ~TraData();
394 
395  private:
396  // no copying
397  TraData(const TraData&);
398  TraData& operator=(const TraData&);
399 
400  protected:
401  std::string version_; // schema version read from the file/stream
402  friend struct IO::HandlerTraData;
403 };
404 
405 
406 typedef boost::shared_ptr<TraData> TraDataPtr;
407 
408 
409 } // tradata
410 } // pwiz
411 
412 
413 #endif // _TRADATA_HPP_