ProteoWizard
MSData.hpp
Go to the documentation of this file.
1 //
2 // $Id$
3 //
4 //
5 // Original author: Darren Kessner <darren@proteowizard.org>
6 //
7 // Copyright 2007 Spielberg Family Center for Applied Proteomics
8 // Cedars-Sinai Medical Center, Los Angeles, California 90048
9 //
10 // Licensed under the Apache License, Version 2.0 (the "License");
11 // you may not use this file except in compliance with the License.
12 // You may obtain a copy of the License at
13 //
14 // http://www.apache.org/licenses/LICENSE-2.0
15 //
16 // Unless required by applicable law or agreed to in writing, software
17 // distributed under the License is distributed on an "AS IS" BASIS,
18 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 // See the License for the specific language governing permissions and
20 // limitations under the License.
21 //
22 
23 
24 #ifndef _MSDATA_HPP_
25 #define _MSDATA_HPP_
26 
27 
31 #include "boost/shared_ptr.hpp"
32 #include "boost/iostreams/positioning.hpp"
33 #include <vector>
34 #include <string>
35 #include <map>
36 #include <set>
37 
38 
39 namespace pwiz {
40 namespace msdata {
41 
42 
43  using namespace pwiz::data;
44 
45 
46 PWIZ_API_DECL std::vector<CV> defaultCVList();
47 
48 
49 /// This summarizes the different types of spectra that can be expected in the file. This is expected to aid processing software in skipping files that do not contain appropriate spectrum types for it.
51 
52 
53 /// Description of the source file, including location and type.
55 {
56  /// an identifier for this file.
57  std::string id;
58 
59  /// name of the source file, without reference to location (either URI or local path).
60  std::string name;
61 
62  /// URI-formatted location where the file was retrieved.
63  std::string location;
64 
65  SourceFile(const std::string _id = "",
66  const std::string _name = "",
67  const std::string _location = "");
68 
69 
70  /// returns true iff the element contains no params and all members are empty or null
71  bool empty() const;
72 };
73 
74 
75 /// Description of the source file, including location and type.
76 typedef boost::shared_ptr<SourceFile> SourceFilePtr;
77 
78 
79 /// Structure allowing the use of a controlled (cvParam) or uncontrolled vocabulary (userParam), or a reference to a predefined set of these in this mzML file (paramGroupRef).
81 
82 
83 /// Information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is stored here.
85 {
86  /// this summarizes the different types of spectra that can be expected in the file. This is expected to aid processing software in skipping files that do not contain appropriate spectrum types for it.
88 
89  /// list and descriptions of the source files this mzML document was generated or derived from.
90  std::vector<SourceFilePtr> sourceFilePtrs;
91 
92  /// structure allowing the use of a controlled (cvParam) or uncontrolled vocabulary (userParam), or a reference to a predefined set of these in this mzML file (paramGroupRef)
93  std::vector<Contact> contacts;
94 
95  /// returns true iff all members are empty or null
96  bool empty() const;
97 };
98 
99 
100 /// Expansible description of the sample used to generate the dataset, named in sampleName.
102 {
103  /// a unique identifier across the samples with which to reference this sample description.
104  std::string id;
105 
106  /// an optional name for the sample description, mostly intended as a quick mnemonic.
107  std::string name;
108 
109  Sample(const std::string _id = "",
110  const std::string _name = "");
111 
112 
113  /// returns true iff the element contains no params and all members are empty or null
114  bool empty() const;
115 };
116 
117 
118 typedef boost::shared_ptr<Sample> SamplePtr;
119 
120 
122 {
127 };
128 
129 
130 /// A component of an instrument corresponding to a source (i.e. ion source), an analyzer (i.e. mass analyzer), or a detector (i.e. ion detector)
132 {
133  /// the type of component (Source, Analyzer, or Detector)
135 
136  /// this attribute MUST be used to indicate the order in which the components are encountered from source to detector (e.g., in a Q-TOF, the quadrupole would have the lower order number, and the TOF the higher number of the two).
137  int order;
138 
139  Component() : type(ComponentType_Unknown), order(0) {}
140  Component(ComponentType type, int order) : type(type), order(order) {}
141  Component(CVID cvid, int order) { define(cvid, order); }
142 
143  void define(CVID cvid, int order);
144 
145  /// returns true iff the element contains no params and all members are empty or null
146  bool empty() const;
147 };
148 
149 
150 //struct PWIZ_API_DECL Source : public Component {};
151 //struct PWIZ_API_DECL Analyzer : public Component {};
152 //struct PWIZ_API_DECL Detector : public Component {};
153 
154 
155 /// List with the different components used in the mass spectrometer. At least one source, one mass analyzer and one detector need to be specified.
156 struct PWIZ_API_DECL ComponentList : public std::vector<Component>
157 {
158  /// returns the source component with ordinal <index+1>
159  Component& source(size_t index);
160 
161  /// returns the analyzer component with ordinal <index+1>
162  Component& analyzer(size_t index);
163 
164  /// returns the detector component with ordinal <index+1>
165  Component& detector(size_t index);
166 
167  /// returns the source component with ordinal <index+1>
168  const Component& source(size_t index) const;
169 
170  /// returns the analyzer component with ordinal <index+1>
171  const Component& analyzer(size_t index) const;
172 
173  /// returns the detector component with ordinal <index+1>
174  const Component& detector(size_t index) const;
175 };
176 
177 
178 /// A piece of software.
180 {
181  /// an identifier for this software that is unique across all SoftwareTypes.
182  std::string id;
183 
184  /// the software version.
185  std::string version;
186 
187  Software(const std::string& _id = "");
188 
189  Software(const std::string& _id,
190  const CVParam& _param,
191  const std::string& _version);
192 
193  /// returns true iff all members are empty or null
194  bool empty() const;
195 };
196 
197 
198 typedef boost::shared_ptr<Software> SoftwarePtr;
199 
200 
201 /// TODO
203 
204 
205 /// Description of the acquisition settings of the instrument prior to the start of the run.
207 {
208  /// a unique identifier for this acquisition setting.
209  std::string id;
210 
211  /// container for a list of source file references.
212  std::vector<SourceFilePtr> sourceFilePtrs;
213 
214  /// target list (or 'inclusion list') configured prior to the run.
215  std::vector<Target> targets;
216 
217  ScanSettings(const std::string& _id = "");
218 
219 
220  /// returns true iff the element contains no params and all members are empty or null
221  bool empty() const;
222 };
223 
224 
225 typedef boost::shared_ptr<ScanSettings> ScanSettingsPtr;
226 
227 
228 /// Description of a particular hardware configuration of a mass spectrometer. Each configuration MUST have one (and only one) of the three different components used for an analysis. For hybrid instruments, such as an LTQ-FT, there MUST be one configuration for each permutation of the components that is used in the document. For software configuration, reference the appropriate ScanSettings element.
230 {
231  /// an identifier for this instrument configuration.
232  std::string id;
233 
234  /// list with the different components used in the mass spectrometer. At least one source, one mass analyzer and one detector need to be specified.
236 
237  /// reference to a previously defined software element.
239 
240  /// reference to a scan settings element defining global scan settings used by this configuration
242 
243  InstrumentConfiguration(const std::string& _id = "");
244 
245  /// returns true iff the element contains no params and all members are empty or null
246  bool empty() const;
247 };
248 
249 
250 typedef boost::shared_ptr<InstrumentConfiguration> InstrumentConfigurationPtr;
251 
252 
253 /// Description of the default peak processing method. This element describes the base method used in the generation of a particular mzML file. Variable methods should be described in the appropriate acquisition section - if no acquisition-specific details are found, then this information serves as the default.
255 {
256  /// this attributes allows a series of consecutive steps to be placed in the correct order.
257  int order;
258 
259  /// this attribute MUST reference the 'id' of the appropriate SoftwareType.
261 
262  ProcessingMethod() : order(0) {}
263 
264  /// returns true iff the element contains no params and all members are empty or null
265  bool empty() const;
266 };
267 
268 
269 typedef boost::shared_ptr<ProcessingMethod> ProcessingMethodPtr;
270 
271 
272 /// Description of the way in which a particular software was used.
274 {
275  /// a unique identifier for this data processing that is unique across all DataProcessingTypes.
276  std::string id;
277 
278  /// description of the default peak processing method(s). This element describes the base method used in the generation of a particular mzML file. Variable methods should be described in the appropriate acquisition section - if no acquisition-specific details are found, then this information serves as the default.
279  std::vector<ProcessingMethod> processingMethods;
280 
281  DataProcessing(const std::string& _id = "");
282 
283  /// returns true iff the element contains no params and all members are empty or null
284  bool empty() const;
285 };
286 
287 
288 typedef boost::shared_ptr<DataProcessing> DataProcessingPtr;
289 
290 
291 /// This element captures the isolation (or 'selection') window configured to isolate one or more precursors.
293 
294 
295 /// TODO
297 {
299  explicit SelectedIon(double mz);
300  explicit SelectedIon(double mz, double intensity, CVID intensityUnit);
301  explicit SelectedIon(double mz, int chargeState);
302  explicit SelectedIon(double mz, double intensity, int chargeState, CVID intensityUnit);
303 };
304 
305 
306 /// The type and energy level used for activation.
308 
309 
310 /// The method of precursor ion selection and activation
312 {
313  /// for precursor spectra that are external to this document, this attribute MUST reference the 'id' attribute of a sourceFile representing that external document.
314  /// note: this attribute is mutually exclusive with spectrumID; i.e. use one or the other but not both
316 
317  /// for precursor spectra that are external to this document, this string MUST correspond to the 'id' attribute of a spectrum in the external document indicated by 'sourceFileRef'.
318  /// note: this attribute is mutually exclusive with spectrumID; i.e. use one or the other but not both
319  std::string externalSpectrumID;
320 
321  /// reference to the id attribute of the spectrum from which the precursor was selected.
322  /// note: this attribute is mutually exclusive with externalSpectrumID; i.e. use one or the other but not both
323  std::string spectrumID;
324 
325  /// this element captures the isolation (or 'selection') window configured to isolate one or more precursors.
327 
328  /// this list of precursor ions that were selected.
329  std::vector<SelectedIon> selectedIons;
330 
331  /// the type and energy level used for activation.
333 
335  explicit Precursor(double mz);
336  explicit Precursor(double mz, double intensity, CVID intensityUnit);
337  explicit Precursor(double mz, int chargeState);
338  explicit Precursor(double mz, double intensity, int chargeState, CVID intensityUnit);
339 
340 
341  /// returns true iff the element contains no params and all members are empty or null
342  bool empty() const;
343 };
344 
345 
346 /// product ion information
348 {
349  /// this element captures the isolation (or 'selection') window configured to isolate one or more precursors.
351 
352  /// returns true iff the element contains no params and all members are empty or null
353  bool empty() const;
354 
355  /// returns true iff this product's isolation window is equal to that product's
356  bool operator==(const Product& that) const;
357 };
358 
359 
360 /// TODO
362 {
364  ScanWindow(double low, double high, CVID unit);
365 };
366 
367 
368 /// Scan or acquisition from original raw file used to create this peak list, as specified in sourceFile.
370 {
371  /// if this attribute is set, it must reference the 'id' attribute of a sourceFile representing the external document containing the spectrum referred to by 'externalSpectrumID'.
372  /// note: this attribute is mutually exclusive with spectrumID; i.e. use one or the other but not both
374 
375  /// for scans that are external to this document, this string must correspond to the 'id' attribute of a spectrum in the external document indicated by 'sourceFileRef'.
376  /// note: this attribute is mutually exclusive with spectrumID; i.e. use one or the other but not both
377  std::string externalSpectrumID;
378 
379  /// for scans that are local to this document, this attribute can be used to reference the 'id' attribute of the spectrum corresponding to the scan.
380  /// note: this attribute is mutually exclusive with externalSpectrumID; i.e. use one or the other but not both
381  std::string spectrumID;
382 
383  /// this attribute MUST reference the 'id' attribute of the appropriate instrument configuration.
385 
386  /// container for a list of select windows.
387  std::vector<ScanWindow> scanWindows;
388 
389  /// returns true iff the element contains no params and all members are empty or null
390  bool empty() const;
391 };
392 
393 
394 /// List and descriptions of scans.
396 {
397  std::vector<Scan> scans;
398 
399  bool empty() const;
400 };
401 
402 
403 /// The structure into which encoded binary data goes. Byte ordering is always little endian (Intel style). Computers using a different endian style MUST convert to/from little endian when writing/reading mzML
405 {
406  /// this optional attribute may reference the 'id' attribute of the appropriate dataProcessing.
408 
409  /// the binary data.
411 
412  /// returns true iff the element contains no params and all members are empty or null
413  bool empty() const;
414 };
415 
416 
417 typedef boost::shared_ptr<BinaryDataArray> BinaryDataArrayPtr;
418 
419 
420 #pragma pack(1)
421 /// The data point type of a mass spectrum.
423 {
424  double mz;
425  double intensity;
426 
428  : mz(0), intensity(0)
429  {}
430 
431  MZIntensityPair(double mz, double intensity)
432  : mz(mz), intensity(intensity)
433  {}
434 
435  /// returns true iff mz and intensity are pairwise equal
436  bool operator==(const MZIntensityPair& that) const;
437 };
438 #pragma pack()
439 
440 
441 PWIZ_API_DECL std::ostream& operator<<(std::ostream& os, const MZIntensityPair& mzi);
442 
443 
444 #pragma pack(1)
445 /// The data point type of a chromatogram.
447 {
448  double time;
449  double intensity;
450 
452  : time(0), intensity(0)
453  {}
454 
455  TimeIntensityPair(double time, double intensity)
456  : time(time), intensity(intensity)
457  {}
458 
459  /// returns true iff time and intensity are pairwise equal
460  bool operator==(const TimeIntensityPair& that) const;
461 };
462 #pragma pack()
463 
464 
465 PWIZ_API_DECL std::ostream& operator<<(std::ostream& os, const TimeIntensityPair& ti);
466 
467 const size_t IDENTITY_INDEX_NONE = (size_t)-1;
468 
469 /// Identifying information for a spectrum
471 {
472  /// the zero-based, consecutive index of the spectrum in the SpectrumList.
473  size_t index;
474 
475  /// a unique identifier for this spectrum. It should be expected that external files may use this identifier together with the mzML filename or accession to reference a particular spectrum.
476  std::string id;
477 
478  /// the identifier for the spot from which this spectrum was derived, if a MALDI or similar run.
479  std::string spotID;
480 
481  /// for file-based MSData implementations, this attribute may refer to the spectrum's position in the file
482  boost::iostreams::stream_offset sourceFilePosition;
483 
484 
485  SpectrumIdentity() : index(IDENTITY_INDEX_NONE), sourceFilePosition((boost::iostreams::stream_offset)-1) {}
486 };
487 
488 /// Identifying information for a chromatogram
490 {
491  /// the zero-based, consecutive index of the chromatogram in the ChromatogramList.
492  size_t index;
493 
494  /// a unique identifier for this chromatogram. It should be expected that external files may use this identifier together with the mzML filename or accession to reference a particular chromatogram.
495  std::string id;
496 
497  /// for file-based MSData implementations, this attribute may refer to the chromatogram's position in the file
498  boost::iostreams::stream_offset sourceFilePosition;
499 
500  ChromatogramIdentity() : index(IDENTITY_INDEX_NONE), sourceFilePosition(-1) {}
501 };
502 
503 
504 /// The structure that captures the generation of a peak list (including the underlying acquisitions)
506 {
507  /// default length of binary data arrays contained in this element.
509 
510  /// this attribute can optionally reference the 'id' of the appropriate dataProcessing.
512 
513  /// this attribute can optionally reference the 'id' of the appropriate sourceFile.
515 
516  /// list of scans
518 
519  /// list and descriptions of precursors to the spectrum currently being described.
520  std::vector<Precursor> precursors;
521 
522  /// list and descriptions of product ion information
523  std::vector<Product> products;
524 
525  /// list of binary data arrays.
526  std::vector<BinaryDataArrayPtr> binaryDataArrayPtrs;
527 
528 
529  Spectrum() : defaultArrayLength(0) {}
530 
531  /// returns true iff the element contains no params and all members are empty or null
532  bool empty() const;
533 
534  /// returns true iff has nonnull and nonempty BinaryDataArrayPtr
535  bool hasBinaryData() const {
536  return binaryDataArrayPtrs.size() &&
537  binaryDataArrayPtrs[0] &&
538  !binaryDataArrayPtrs[0]->data.empty();
539  };
540 
541  /// copy binary data arrays into m/z-intensity pair array
542  void getMZIntensityPairs(std::vector<MZIntensityPair>& output) const;
543 
544  /// copy binary data arrays into m/z-intensity pair array
545  /// note: this overload is to allow client to allocate own buffer; the client
546  /// must determine the correct size beforehand, or an exception will be thrown
547  void getMZIntensityPairs(MZIntensityPair* output, size_t expectedSize) const;
548 
549  /// get m/z array (may be null)
550  BinaryDataArrayPtr getMZArray() const;
551 
552  /// get intensity array (may be null)
553  BinaryDataArrayPtr getIntensityArray() const;
554 
555  /// get array with specified CVParam (may be null)
556  BinaryDataArrayPtr getArrayByCVID(CVID arrayType) const;
557 
558  /// set binary data arrays
559  void setMZIntensityPairs(const std::vector<MZIntensityPair>& input, CVID intensityUnits);
560 
561  /// set binary data arrays
562  void setMZIntensityPairs(const MZIntensityPair* input, size_t size, CVID intensityUnits);
563 
564  /// set m/z and intensity arrays separately (they must be the same size)
565  void setMZIntensityArrays(const std::vector<double>& mzArray, const std::vector<double>& intensityArray, CVID intensityUnits);
566 
567  /// set m/z and intensity arrays separately (they must be the same size) by swapping the vector contents
568  /// this allows for a more nearly zero copy setup. Contents of mzArray and intensityArray are undefined after calling.
569  void swapMZIntensityArrays(pwiz::util::BinaryData<double>& mzArray, pwiz::util::BinaryData<double>& intensityArray, CVID intensityUnits);
570 };
571 
572 
573 typedef boost::shared_ptr<Spectrum> SpectrumPtr;
574 
575 
576 /// A single chromatogram.
578 {
579  /// default length of binary data arrays contained in this element.
581 
582  /// this attribute can optionally reference the 'id' of the appropriate dataProcessing.
584 
585  /// description of precursor ion information (i.e. Q1 settings)
587 
588  /// description of product ion information (i.e. Q3 settings)
590 
591  /// list of binary data arrays.
592  std::vector<BinaryDataArrayPtr> binaryDataArrayPtrs;
593 
594  Chromatogram() : defaultArrayLength(0) {}
595 
596  /// returns true iff the element contains no params and all members are empty or null
597  bool empty() const;
598 
599  /// copy binary data arrays into time-intensity pair array
600  void getTimeIntensityPairs(std::vector<TimeIntensityPair>& output) const;
601 
602  /// copy binary data arrays into time-intensity pair array
603  /// note: this overload is to allow client to allocate own buffer; the client
604  /// must determine the correct size beforehand, or an exception will be thrown
605  void getTimeIntensityPairs(TimeIntensityPair* output, size_t expectedSize) const;
606 
607  /// get time array (may be null)
608  BinaryDataArrayPtr getTimeArray() const;
609 
610  /// get intensity array (may be null)
611  BinaryDataArrayPtr getIntensityArray() const;
612 
613  /// set binary data arrays
614  void setTimeIntensityPairs(const std::vector<TimeIntensityPair>& input, CVID timeUnits, CVID intensityUnits);
615 
616  /// set binary data arrays
617  void setTimeIntensityPairs(const TimeIntensityPair* input, size_t size, CVID timeUnits, CVID intensityUnits);
618 
619  /// set time and intensity arrays separately (they must be the same size)
620  void setTimeIntensityArrays(const std::vector<double>& timeArray, const std::vector<double>& intensityArray, CVID timeUnits, CVID intensityUnits);
621 };
622 
623 
624 typedef boost::shared_ptr<Chromatogram> ChromatogramPtr;
625 
626 
627 // note: derived container to support dynamic linking on Windows
628 class IndexList : public std::vector<size_t> {};
629 
631 {
636 };
637 
638 ///
639 /// Interface for accessing spectra, which may be stored in memory
640 /// or backed by a data file (RAW, mzXML, mzML).
641 ///
642 /// Implementation notes:
643 ///
644 /// - Implementations are expected to keep a spectrum index in the form of
645 /// vector<SpectrumIdentity> or equivalent. The default find*() functions search
646 /// the index linearly. Implementations may provide constant time indexing.
647 ///
648 /// - The semantics of spectrum() may vary slightly with implementation. In particular,
649 /// a SpectrumList implementation that is backed by a file may choose either to cache
650 /// or discard the SpectrumPtrs for future access, with the caveat that the client
651 /// may write to the underlying data.
652 ///
653 /// - It is the implementation's responsibility to return a valid SpectrumPtr from spectrum().
654 /// If this cannot be done, an exception must be thrown.
655 ///
656 /// - The 'getBinaryData' flag is a hint if false : implementations may provide valid
657 /// BinaryDataArrayPtrs on spectrum(index, false); implementations *must* provide
658 /// valid BinaryDataArrayPtrs on spectrum(index, true).
659 ///
661 {
662  public:
663 
664  /// returns the number of spectra
665  virtual size_t size() const = 0;
666 
667  /// returns true iff (size() == 0) and (dataProcessingPtr.get() == NULL)
668  virtual bool empty() const;
669 
670  /// access to a spectrum index
671  virtual const SpectrumIdentity& spectrumIdentity(size_t index) const = 0;
672 
673  /// find id in the spectrum index (returns size() on failure)
674  virtual size_t find(const std::string& id) const;
675 
676  /// find an abbreviated id (e.g. "1.1.123.2" for "sample=1 period=1 cycle=123 experiment=2") in the spectrum index (returns size() on failure)
677  virtual size_t findAbbreviated(const std::string& abbreviatedId, char delimiter = '.') const;
678 
679  /// find all spectrum indexes with specified name/value pair
680  virtual IndexList findNameValue(const std::string& name, const std::string& value) const;
681 
682  /// find all spectrum indexes with spotID (returns empty vector on failure)
683  virtual IndexList findSpotID(const std::string& spotID) const;
684 
685  /// retrieve a spectrum by index
686  /// - binary data arrays will be provided if (getBinaryData == true);
687  /// - client may assume the underlying Spectrum* is valid
688  virtual SpectrumPtr spectrum(size_t index, bool getBinaryData = false) const = 0;
689 
690  /// get a copy of the seed spectrum, optionally with its binary data populated
691  /// this is useful for formats like mzML that can delay loading of binary data
692  /// - client may assume the underlying Spectrum* is valid
693  virtual SpectrumPtr spectrum(const SpectrumPtr& seed, bool getBinaryData) const;
694 
695  /// retrieve a spectrum by index
696  /// - detailLevel determines what fields are guaranteed present on the spectrum after the call
697  /// - client may assume the underlying Spectrum* is valid
698  virtual SpectrumPtr spectrum(size_t index, DetailLevel detailLevel) const;
699 
700  /// returns the data processing affecting spectra retrieved through this interface
701  /// - may return a null shared pointer
702  virtual const boost::shared_ptr<const DataProcessing> dataProcessingPtr() const;
703 
704  /// issues a warning once per SpectrumList instance (based on string hash)
705  virtual void warn_once(const char* msg) const;
706 
707  virtual ~SpectrumList(){}
708 };
709 
710 
711 typedef boost::shared_ptr<SpectrumList> SpectrumListPtr;
712 
713 
714 /// Simple writeable in-memory implementation of SpectrumList.
715 /// Note: This spectrum() implementation returns internal SpectrumPtrs.
717 {
718  std::vector<SpectrumPtr> spectra;
720 
721  // SpectrumList implementation
722 
723  virtual size_t size() const {return spectra.size();}
724  virtual bool empty() const {return spectra.empty() && !dp.get();}
725  virtual const SpectrumIdentity& spectrumIdentity(size_t index) const;
726  virtual SpectrumPtr spectrum(size_t index, bool getBinaryData) const;
727  virtual const boost::shared_ptr<const DataProcessing> dataProcessingPtr() const;
728 };
729 
730 
731 typedef boost::shared_ptr<SpectrumListSimple> SpectrumListSimplePtr;
732 
733 
734 ///
735 /// Interface for accessing chromatograms, which may be stored in memory
736 /// or backed by a data file (RAW, mzXML, mzML).
737 ///
738 /// Implementation notes:
739 ///
740 /// - Implementations are expected to keep a chromatogram index in the form of
741 /// vector<ChromatogramIdentity> or equivalent. The default find*() functions search
742 /// the index linearly. Implementations may provide constant time indexing.
743 ///
744 /// - The semantics of chromatogram() may vary slightly with implementation. In particular,
745 /// a ChromatogramList implementation that is backed by a file may choose either to cache
746 /// or discard the ChromatogramPtrs for future access, with the caveat that the client
747 /// may write to the underlying data.
748 ///
749 /// - It is the implementation's responsibility to return a valid ChromatogramPtr from chromatogram().
750 /// If this cannot be done, an exception must be thrown.
751 ///
752 /// - The 'getBinaryData' flag is a hint if false : implementations may provide valid
753 /// BinaryDataArrayPtrs on chromatogram(index, false); implementations *must* provide
754 /// valid BinaryDataArrayPtrs on chromatogram(index, true).
755 ///
757 {
758  public:
759 
760  /// returns the number of chromatograms
761  virtual size_t size() const = 0;
762 
763  /// returns true iff (size() == 0) and (dataProcessingPtr.get() == NULL)
764  bool empty() const;
765 
766  /// access to a chromatogram index
767  virtual const ChromatogramIdentity& chromatogramIdentity(size_t index) const = 0;
768 
769  /// find id in the chromatogram index (returns size() on failure)
770  virtual size_t find(const std::string& id) const;
771 
772  /// retrieve a chromatogram by index
773  /// - binary data arrays will be provided if (getBinaryData == true);
774  /// - client may assume the underlying Chromatogram* is valid
775  virtual ChromatogramPtr chromatogram(size_t index, bool getBinaryData = false) const = 0;
776 
777  /// returns the data processing affecting spectra retrieved through this interface
778  /// - may return a null shared pointer
779  virtual const boost::shared_ptr<const DataProcessing> dataProcessingPtr() const;
780 
781  virtual ~ChromatogramList(){}
782 };
783 
784 
785 typedef boost::shared_ptr<ChromatogramList> ChromatogramListPtr;
786 
787 
788 /// Simple writeable in-memory implementation of ChromatogramList.
789 /// Note: This chromatogram() implementation returns internal ChromatogramPtrs.
791 {
792  std::vector<ChromatogramPtr> chromatograms;
794 
795  // ChromatogramList implementation
796 
797  virtual size_t size() const {return chromatograms.size();}
798  virtual bool empty() const {return chromatograms.empty() && !dp.get();}
799  virtual const ChromatogramIdentity& chromatogramIdentity(size_t index) const;
800  virtual ChromatogramPtr chromatogram(size_t index, bool getBinaryData) const;
801  virtual const boost::shared_ptr<const DataProcessing> dataProcessingPtr() const;
802 };
803 
804 
805 typedef boost::shared_ptr<ChromatogramListSimple> ChromatogramListSimplePtr;
806 
807 
808 /// A run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
810 {
811  /// a unique identifier for this run.
812  std::string id;
813 
814  /// this attribute MUST reference the 'id' of the default instrument configuration. If a scan does not reference an instrument configuration, it implicitly refers to this configuration.
816 
817  /// this attribute MUST reference the 'id' of the appropriate sample.
819 
820  /// the optional start timestamp of the run, in UT.
821  std::string startTimeStamp;
822 
823  /// default source file reference
825 
826  /// all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
828 
829  /// all chromatograms for this run.
831 
832  Run(){}
833  bool empty() const;
834 
835  private:
836  // no copying - any implementation must handle:
837  // - SpectrumList cloning
838  // - internal cross-references to heap-allocated objects
839  Run(const Run&);
840  Run& operator=(const Run&);
841 };
842 
843 
844 namespace IO {struct HandlerMSData;} // forward declaration for friend
845 
846 
847 /// This is the root element of ProteoWizard; it represents the mzML element, defined as:
848 /// intended to capture the use of a mass spectrometer, the data generated, and the initial processing of that data (to the level of the peak list).
850 {
851  /// an optional accession number for the mzML document.
852  std::string accession;
853 
854  /// an optional id for the mzML document. It is recommended to use LSIDs when possible.
855  std::string id;
856 
857  /// container for one or more controlled vocabulary definitions.
858  /// 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.
859  std::vector<CV> cvs;
860 
861  /// information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is stored here.
863 
864  /// container for a list of referenceableParamGroups
865  std::vector<ParamGroupPtr> paramGroupPtrs;
866 
867  /// list and descriptions of samples.
868  std::vector<SamplePtr> samplePtrs;
869 
870  /// list and descriptions of software used to acquire and/or process the data in this mzML file.
871  std::vector<SoftwarePtr> softwarePtrs;
872 
873  /// list with the descriptions of the acquisition settings applied prior to the start of data acquisition.
874  std::vector<ScanSettingsPtr> scanSettingsPtrs;
875 
876  /// list and descriptions of instrument configurations.
877  std::vector<InstrumentConfigurationPtr> instrumentConfigurationPtrs;
878 
879  /// list and descriptions of data processing applied to this data.
880  std::vector<DataProcessingPtr> dataProcessingPtrs;
881 
882  /// return dataProcessingPtrs augmented by the dataProcessingPtr() set in SpectrumList and/or ChromatogramList
883  std::vector<DataProcessingPtr> allDataProcessingPtrs() const;
884 
885  /// a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
887 
888  MSData();
889  virtual ~MSData();
890  bool empty() const;
891 
892  /// returns the version of this mzML document;
893  /// for a document created programmatically, the version is the current release version of mzML;
894  /// for a document created from a file/stream, the version is the schema version read from the file/stream
895  const std::string& version() const;
896 
897  // for detecting out of order filters
898  void filterApplied() {nFiltersApplied_++;};
899  int countFiltersApplied() const {return nFiltersApplied_;};
900 
901  private:
902  // no copying
903  MSData(const MSData&);
904  MSData& operator=(const MSData&);
905 
906  protected:
907  std::string version_; // schema version read from the file/stream
908  friend struct IO::HandlerMSData;
909  int nFiltersApplied_; // useful for flagging filters that need to be first, like vendor centroiding
910 };
911 
912 
913 typedef boost::shared_ptr<MSData> MSDataPtr;
914 
915 
916 namespace id {
917 
918 /// parses an id string into a map<string,string>
919 PWIZ_API_DECL std::map<std::string,std::string> parse(const std::string& id);
920 
921 /// convenience function to extract a named value from an id string
922 PWIZ_API_DECL std::string value(const std::string& id, const std::string& name);
923 
924 /// templated convenience function to extract a named value from an id string
925 template<typename value_type>
926 value_type valueAs(const std::string& id, const std::string& name)
927 {
928  std::string result = value(id, name);
929  return !result.empty() ? boost::lexical_cast<value_type>(result)
930  : boost::lexical_cast<value_type>(0);
931 }
932 
933 /// returns the nativeID format from the defaultSourceFilePtr if set,
934 /// or from sourceFilePtrs[0] if the list isn't empty,
935 /// or CVID_Unknown
937 
938 /// translates a "scan number" to a string that is correct for the given nativeID format;
939 /// semantic validity requires that scanNumber be parseable as an integer;
940 /// some nativeID formats cannot be translated to and will always return an empty string
941 /// currently supported formats: Thermo, Bruker/Agilent YEP, Bruker BAF, mzXML, MGF, and mzData
942 PWIZ_API_DECL std::string translateScanNumberToNativeID(CVID nativeIDFormat, const std::string& scanNumber);
943 
944 /// translates a nativeID in the given nativeID format to a simple integer "scan number";
945 /// some nativeID formats cannot be translated from and will always return an empty string
946 /// currently supported formats: Thermo, Bruker/Agilent YEP, Bruker BAF, mzXML, MGF, and mzData
947 PWIZ_API_DECL std::string translateNativeIDToScanNumber(CVID nativeIDFormat, const std::string& id);
948 
949 /// abbreviates a nativeID ("name1=value1 name2=value2" translates to "value1.value2")
950 PWIZ_API_DECL std::string abbreviate(const std::string& id, char delimiter = '.');
951 
952 } // namespace id
953 
954 
955 } // namespace msdata
956 } // namespace pwiz
957 
958 
959 #endif // _MSDATA_HPP_
960 
pwiz::msdata::BinaryDataArrayPtr
boost::shared_ptr< BinaryDataArray > BinaryDataArrayPtr
Definition: MSData.hpp:417
pwiz::msdata::Sample::id
std::string id
a unique identifier across the samples with which to reference this sample description.
Definition: MSData.hpp:104
pwiz::msdata::SpectrumListSimple::size
virtual size_t size() const
returns the number of spectra
Definition: MSData.hpp:723
pwiz::msdata::ChromatogramIdentity::id
std::string id
a unique identifier for this chromatogram. It should be expected that external files may use this ide...
Definition: MSData.hpp:495
pwiz::msdata::Spectrum::Spectrum
Spectrum()
Definition: MSData.hpp:529
pwiz::msdata::IsolationWindow
This element captures the isolation (or 'selection') window configured to isolate one or more precurs...
Definition: MSData.hpp:292
pwiz::msdata::Sample::name
std::string name
an optional name for the sample description, mostly intended as a quick mnemonic.
Definition: MSData.hpp:107
pwiz::msdata::ChromatogramListSimple
Simple writeable in-memory implementation of ChromatogramList.
Definition: MSData.hpp:790
pwiz::msdata::SpectrumListPtr
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:711
pwiz::msdata::Chromatogram::binaryDataArrayPtrs
std::vector< BinaryDataArrayPtr > binaryDataArrayPtrs
list of binary data arrays.
Definition: MSData.hpp:592
pwiz::msdata::InstrumentConfiguration::componentList
ComponentList componentList
list with the different components used in the mass spectrometer. At least one source,...
Definition: MSData.hpp:235
pwiz::msdata::SpectrumIdentity
Identifying information for a spectrum.
Definition: MSData.hpp:470
pwiz::msdata::MSData::softwarePtrs
std::vector< SoftwarePtr > softwarePtrs
list and descriptions of software used to acquire and/or process the data in this mzML file.
Definition: MSData.hpp:871
pwiz::msdata::Spectrum
The structure that captures the generation of a peak list (including the underlying acquisitions)
Definition: MSData.hpp:505
pwiz
Definition: ChromatogramList_Filter.hpp:36
pwiz::msdata::id::parse
PWIZ_API_DECL std::map< std::string, std::string > parse(const std::string &id)
parses an id string into a map<string,string>
pwiz::msdata::Software
A piece of software.
Definition: MSData.hpp:179
pwiz::msdata::ProcessingMethod
Description of the default peak processing method. This element describes the base method used in the...
Definition: MSData.hpp:254
pwiz::msdata::MSData::id
std::string id
an optional id for the mzML document. It is recommended to use LSIDs when possible.
Definition: MSData.hpp:855
pwiz::msdata::ProcessingMethod::softwarePtr
SoftwarePtr softwarePtr
this attribute MUST reference the 'id' of the appropriate SoftwareType.
Definition: MSData.hpp:260
pwiz::msdata::ScanWindow::ScanWindow
ScanWindow()
Definition: MSData.hpp:363
pwiz::msdata::SourceFile
Description of the source file, including location and type.
Definition: MSData.hpp:54
pwiz::msdata::MSData::version_
std::string version_
Definition: MSData.hpp:907
pwiz::msdata::Product::isolationWindow
IsolationWindow isolationWindow
this element captures the isolation (or 'selection') window configured to isolate one or more precurs...
Definition: MSData.hpp:350
pwiz::msdata::ScanSettings::sourceFilePtrs
std::vector< SourceFilePtr > sourceFilePtrs
container for a list of source file references.
Definition: MSData.hpp:212
pwiz::msdata::Run
A run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
Definition: MSData.hpp:809
pwiz::msdata::Chromatogram::defaultArrayLength
size_t defaultArrayLength
default length of binary data arrays contained in this element.
Definition: MSData.hpp:580
pwiz::frequency::operator==
PWIZ_API_DECL bool operator==(const TruncatedLorentzianParameters &t, const TruncatedLorentzianParameters &u)
pwiz::msdata::Product
product ion information
Definition: MSData.hpp:347
pwiz::msdata::SpectrumIdentity::index
size_t index
the zero-based, consecutive index of the spectrum in the SpectrumList.
Definition: MSData.hpp:473
pwiz::msdata::ScanSettingsPtr
boost::shared_ptr< ScanSettings > ScanSettingsPtr
Definition: MSData.hpp:225
pwiz::msdata::SourceFile::name
std::string name
name of the source file, without reference to location (either URI or local path).
Definition: MSData.hpp:60
pwiz::msdata::Contact
Structure allowing the use of a controlled (cvParam) or uncontrolled vocabulary (userParam),...
Definition: MSData.hpp:80
pwiz::msdata::ScanList
List and descriptions of scans.
Definition: MSData.hpp:395
pwiz::data
Definition: BinaryIndexStream.hpp:31
pwiz::msdata::Run::Run
Run()
Definition: MSData.hpp:832
pwiz::msdata::Scan::instrumentConfigurationPtr
InstrumentConfigurationPtr instrumentConfigurationPtr
this attribute MUST reference the 'id' attribute of the appropriate instrument configuration.
Definition: MSData.hpp:384
pwiz::msdata::SpectrumIdentity::sourceFilePosition
boost::iostreams::stream_offset sourceFilePosition
for file-based MSData implementations, this attribute may refer to the spectrum's position in the fil...
Definition: MSData.hpp:482
pwiz::msdata::id::value
PWIZ_API_DECL std::string value(const std::string &id, const std::string &name)
convenience function to extract a named value from an id string
pwiz::msdata::id::translateScanNumberToNativeID
PWIZ_API_DECL std::string translateScanNumberToNativeID(CVID nativeIDFormat, const std::string &scanNumber)
translates a "scan number" to a string that is correct for the given nativeID format; semantic validi...
pwiz::msdata::FileDescription::sourceFilePtrs
std::vector< SourceFilePtr > sourceFilePtrs
list and descriptions of the source files this mzML document was generated or derived from.
Definition: MSData.hpp:90
pwiz::msdata::MSData::accession
std::string accession
an optional accession number for the mzML document.
Definition: MSData.hpp:852
pwiz::msdata::MSData::run
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
Definition: MSData.hpp:886
pwiz::msdata::IndexList
Definition: MSData.hpp:628
boost
Definition: DateTime.hpp:41
pwiz::msdata::Scan::scanWindows
std::vector< ScanWindow > scanWindows
container for a list of select windows.
Definition: MSData.hpp:387
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition: Export.hpp:32
pwiz::msdata::Run::defaultSourceFilePtr
SourceFilePtr defaultSourceFilePtr
default source file reference
Definition: MSData.hpp:824
pwiz::msdata::BinaryDataArray::dataProcessingPtr
DataProcessingPtr dataProcessingPtr
this optional attribute may reference the 'id' attribute of the appropriate dataProcessing.
Definition: MSData.hpp:407
pwiz::msdata::Chromatogram::dataProcessingPtr
DataProcessingPtr dataProcessingPtr
this attribute can optionally reference the 'id' of the appropriate dataProcessing.
Definition: MSData.hpp:583
pwiz::msdata::DataProcessing::processingMethods
std::vector< ProcessingMethod > processingMethods
description of the default peak processing method(s). This element describes the base method used in ...
Definition: MSData.hpp:279
pwiz::msdata::BinaryDataArray::data
pwiz::util::BinaryData< double > data
the binary data.
Definition: MSData.hpp:410
pwiz::msdata::ChromatogramIdentity
Identifying information for a chromatogram.
Definition: MSData.hpp:489
pwiz::msdata::Precursor::spectrumID
std::string spectrumID
reference to the id attribute of the spectrum from which the precursor was selected.
Definition: MSData.hpp:323
pwiz::msdata::Precursor::isolationWindow
IsolationWindow isolationWindow
this element captures the isolation (or 'selection') window configured to isolate one or more precurs...
Definition: MSData.hpp:326
pwiz::msdata::MSData::cvs
std::vector< CV > cvs
container for one or more controlled vocabulary definitions.
Definition: MSData.hpp:859
pwiz::msdata::ComponentType
ComponentType
Definition: MSData.hpp:121
pwiz::msdata::ComponentList
List with the different components used in the mass spectrometer. At least one source,...
Definition: MSData.hpp:156
pwiz::msdata::ChromatogramListSimple::dp
DataProcessingPtr dp
Definition: MSData.hpp:793
pwiz::msdata::SourceFile::id
std::string id
an identifier for this file.
Definition: MSData.hpp:57
pwiz::msdata::Component::type
ComponentType type
the type of component (Source, Analyzer, or Detector)
Definition: MSData.hpp:134
Export.hpp
pwiz::msdata::Activation
The type and energy level used for activation.
Definition: MSData.hpp:307
pwiz::msdata::ChromatogramListPtr
boost::shared_ptr< ChromatogramList > ChromatogramListPtr
Definition: MSData.hpp:785
pwiz::msdata::Component::order
int order
this attribute MUST be used to indicate the order in which the components are encountered from source...
Definition: MSData.hpp:137
pwiz::msdata::Chromatogram
A single chromatogram.
Definition: MSData.hpp:577
pwiz::msdata::Scan::spectrumID
std::string spectrumID
for scans that are local to this document, this attribute can be used to reference the 'id' attribute...
Definition: MSData.hpp:381
pwiz::msdata::DetailLevel_FullMetadata
@ DetailLevel_FullMetadata
Definition: MSData.hpp:634
pwiz::msdata::Spectrum::sourceFilePtr
SourceFilePtr sourceFilePtr
this attribute can optionally reference the 'id' of the appropriate sourceFile.
Definition: MSData.hpp:514
pwiz::msdata::DetailLevel_InstantMetadata
@ DetailLevel_InstantMetadata
Definition: MSData.hpp:632
pwiz::msdata::ScanWindow
TODO.
Definition: MSData.hpp:361
pwiz::msdata::SpectrumIdentity::id
std::string id
a unique identifier for this spectrum. It should be expected that external files may use this identif...
Definition: MSData.hpp:476
pwiz::msdata::ScanSettings::targets
std::vector< Target > targets
target list (or 'inclusion list') configured prior to the run.
Definition: MSData.hpp:215
pwiz::msdata::DataProcessing::id
std::string id
a unique identifier for this data processing that is unique across all DataProcessingTypes.
Definition: MSData.hpp:276
ParamTypes.hpp
pwiz::msdata::Spectrum::dataProcessingPtr
DataProcessingPtr dataProcessingPtr
this attribute can optionally reference the 'id' of the appropriate dataProcessing.
Definition: MSData.hpp:511
pwiz::msdata::ChromatogramIdentity::sourceFilePosition
boost::iostreams::stream_offset sourceFilePosition
for file-based MSData implementations, this attribute may refer to the chromatogram's position in the...
Definition: MSData.hpp:498
pwiz::msdata::Run::id
std::string id
a unique identifier for this run.
Definition: MSData.hpp:812
pwiz::msdata::SpectrumListSimple::empty
virtual bool empty() const
returns true iff (size() == 0) and (dataProcessingPtr.get() == NULL)
Definition: MSData.hpp:724
pwiz::msdata::ComponentType_Detector
@ ComponentType_Detector
Definition: MSData.hpp:126
pwiz::msdata::ScanSettings::id
std::string id
a unique identifier for this acquisition setting.
Definition: MSData.hpp:209
pwiz::msdata::FileDescription::fileContent
FileContent fileContent
this summarizes the different types of spectra that can be expected in the file. This is expected to ...
Definition: MSData.hpp:87
pwiz::msdata::operator<<
PWIZ_API_DECL std::ostream & operator<<(std::ostream &os, const BinaryDataEncoder::Config &config)
pwiz::msdata::InstrumentConfiguration::id
std::string id
an identifier for this instrument configuration.
Definition: MSData.hpp:232
pwiz::data::ParamContainer
The base class for elements that may contain cvParams, userParams, or paramGroup references.
Definition: ParamTypes.hpp:244
pwiz::msdata::MSData::fileDescription
FileDescription fileDescription
information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is sto...
Definition: MSData.hpp:862
pwiz::msdata::TimeIntensityPair::intensity
double intensity
Definition: MSData.hpp:449
pwiz::msdata::MSDataPtr
boost::shared_ptr< MSData > MSDataPtr
Definition: MSData.hpp:913
pwiz::msdata::id::translateNativeIDToScanNumber
PWIZ_API_DECL std::string translateNativeIDToScanNumber(CVID nativeIDFormat, const std::string &id)
translates a nativeID in the given nativeID format to a simple integer "scan number"; some nativeID f...
pwiz::msdata::SamplePtr
boost::shared_ptr< Sample > SamplePtr
Definition: MSData.hpp:118
pwiz::msdata::ComponentType_Source
@ ComponentType_Source
Definition: MSData.hpp:124
pwiz::msdata::ProcessingMethod::ProcessingMethod
ProcessingMethod()
Definition: MSData.hpp:262
pwiz::msdata::SpectrumIdentity::spotID
std::string spotID
the identifier for the spot from which this spectrum was derived, if a MALDI or similar run.
Definition: MSData.hpp:479
pwiz::msdata::MSData::scanSettingsPtrs
std::vector< ScanSettingsPtr > scanSettingsPtrs
list with the descriptions of the acquisition settings applied prior to the start of data acquisition...
Definition: MSData.hpp:874
pwiz::msdata::Component::Component
Component()
Definition: MSData.hpp:139
pwiz::msdata::SelectedIon::SelectedIon
SelectedIon()
Definition: MSData.hpp:298
pwiz::msdata::ComponentType_Unknown
@ ComponentType_Unknown
Definition: MSData.hpp:123
pwiz::msdata::ChromatogramListSimple::empty
virtual bool empty() const
Definition: MSData.hpp:798
pwiz::msdata::Scan::sourceFilePtr
SourceFilePtr sourceFilePtr
if this attribute is set, it must reference the 'id' attribute of a sourceFile representing the exter...
Definition: MSData.hpp:373
pwiz::msdata::MZIntensityPair::intensity
double intensity
Definition: MSData.hpp:425
pwiz::msdata::defaultCVList
PWIZ_API_DECL std::vector< CV > defaultCVList()
pwiz::msdata::FileDescription
Information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is sto...
Definition: MSData.hpp:84
pwiz::msdata::Spectrum::products
std::vector< Product > products
list and descriptions of product ion information
Definition: MSData.hpp:523
pwiz::msdata::Software::version
std::string version
the software version.
Definition: MSData.hpp:185
pwiz::msdata::Component
A component of an instrument corresponding to a source (i.e. ion source), an analyzer (i....
Definition: MSData.hpp:131
pwiz::msdata::ComponentType_Analyzer
@ ComponentType_Analyzer
Definition: MSData.hpp:125
pwiz::msdata::SpectrumPtr
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: MSData.hpp:573
pwiz::msdata::InstrumentConfiguration::scanSettingsPtr
ScanSettingsPtr scanSettingsPtr
reference to a scan settings element defining global scan settings used by this configuration
Definition: MSData.hpp:241
pwiz::msdata::SourceFile::location
std::string location
URI-formatted location where the file was retrieved.
Definition: MSData.hpp:63
pwiz::msdata::TimeIntensityPair::TimeIntensityPair
TimeIntensityPair()
Definition: MSData.hpp:451
pwiz::msdata::Precursor::activation
Activation activation
the type and energy level used for activation.
Definition: MSData.hpp:332
pwiz::msdata::SpectrumList::~SpectrumList
virtual ~SpectrumList()
Definition: MSData.hpp:707
pwiz::msdata::Spectrum::binaryDataArrayPtrs
std::vector< BinaryDataArrayPtr > binaryDataArrayPtrs
list of binary data arrays.
Definition: MSData.hpp:526
pwiz::msdata::ScanSettings
Description of the acquisition settings of the instrument prior to the start of the run.
Definition: MSData.hpp:206
pwiz::msdata::SpectrumIdentity::SpectrumIdentity
SpectrumIdentity()
Definition: MSData.hpp:485
pwiz::msdata::FileDescription::contacts
std::vector< Contact > contacts
structure allowing the use of a controlled (cvParam) or uncontrolled vocabulary (userParam),...
Definition: MSData.hpp:93
pwiz::msdata::MSData::countFiltersApplied
int countFiltersApplied() const
Definition: MSData.hpp:899
pwiz::util::BinaryData< double >
pwiz::msdata::Software::id
std::string id
an identifier for this software that is unique across all SoftwareTypes.
Definition: MSData.hpp:182
pwiz::msdata::SpectrumListSimple
Simple writeable in-memory implementation of SpectrumList.
Definition: MSData.hpp:716
pwiz::msdata::TimeIntensityPair
The data point type of a chromatogram.
Definition: MSData.hpp:446
pwiz::msdata::Spectrum::scanList
ScanList scanList
list of scans
Definition: MSData.hpp:517
pwiz::msdata::Scan
Scan or acquisition from original raw file used to create this peak list, as specified in sourceFile.
Definition: MSData.hpp:369
pwiz::msdata::MSData::filterApplied
void filterApplied()
Definition: MSData.hpp:898
pwiz::msdata::SourceFilePtr
boost::shared_ptr< SourceFile > SourceFilePtr
Description of the source file, including location and type.
Definition: MSData.hpp:76
pwiz::msdata::ChromatogramList::~ChromatogramList
virtual ~ChromatogramList()
Definition: MSData.hpp:781
pwiz::msdata::Run::spectrumListPtr
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here....
Definition: MSData.hpp:827
pwiz::msdata::TimeIntensityPair::TimeIntensityPair
TimeIntensityPair(double time, double intensity)
Definition: MSData.hpp:455
pwiz::msdata::ScanList::scans
std::vector< Scan > scans
Definition: MSData.hpp:397
pwiz::msdata::Run::startTimeStamp
std::string startTimeStamp
the optional start timestamp of the run, in UT.
Definition: MSData.hpp:821
pwiz::msdata::FileContent
This summarizes the different types of spectra that can be expected in the file. This is expected to ...
Definition: MSData.hpp:50
pwiz::msdata::Sample
Expansible description of the sample used to generate the dataset, named in sampleName.
Definition: MSData.hpp:101
pwiz::msdata::DataProcessingPtr
boost::shared_ptr< DataProcessing > DataProcessingPtr
Definition: MSData.hpp:288
pwiz::msdata::Precursor::externalSpectrumID
std::string externalSpectrumID
for precursor spectra that are external to this document, this string MUST correspond to the 'id' att...
Definition: MSData.hpp:319
pwiz::msdata::SelectedIon
TODO.
Definition: MSData.hpp:296
pwiz::msdata::MSData::nFiltersApplied_
int nFiltersApplied_
Definition: MSData.hpp:909
pwiz::msdata::MSData::samplePtrs
std::vector< SamplePtr > samplePtrs
list and descriptions of samples.
Definition: MSData.hpp:868
pwiz::msdata::DetailLevel_FastMetadata
@ DetailLevel_FastMetadata
Definition: MSData.hpp:633
pwiz::msdata::BinaryDataArray
The structure into which encoded binary data goes. Byte ordering is always little endian (Intel style...
Definition: MSData.hpp:404
pwiz::msdata::ProcessingMethodPtr
boost::shared_ptr< ProcessingMethod > ProcessingMethodPtr
Definition: MSData.hpp:269
pwiz::msdata::SpectrumListSimple::dp
DataProcessingPtr dp
Definition: MSData.hpp:719
pwiz::msdata::Component::Component
Component(CVID cvid, int order)
Definition: MSData.hpp:141
pwiz::chemistry::Ion::mz
double mz(double neutralMass, int protonDelta, int electronDelta=0, int neutronDelta=0)
Definition: Ion.hpp:78
pwiz::msdata::Target
TODO.
Definition: MSData.hpp:202
pwiz::msdata::MSData::dataProcessingPtrs
std::vector< DataProcessingPtr > dataProcessingPtrs
list and descriptions of data processing applied to this data.
Definition: MSData.hpp:880
pwiz::msdata::MZIntensityPair::MZIntensityPair
MZIntensityPair(double mz, double intensity)
Definition: MSData.hpp:431
pwiz::msdata::MSData::instrumentConfigurationPtrs
std::vector< InstrumentConfigurationPtr > instrumentConfigurationPtrs
list and descriptions of instrument configurations.
Definition: MSData.hpp:877
pwiz::msdata::ChromatogramListSimple::size
virtual size_t size() const
returns the number of chromatograms
Definition: MSData.hpp:797
pwiz::msdata::IDENTITY_INDEX_NONE
const size_t IDENTITY_INDEX_NONE
Definition: MSData.hpp:467
pwiz::msdata::InstrumentConfiguration::softwarePtr
SoftwarePtr softwarePtr
reference to a previously defined software element.
Definition: MSData.hpp:238
pwiz::msdata::InstrumentConfiguration
Description of a particular hardware configuration of a mass spectrometer. Each configuration MUST ha...
Definition: MSData.hpp:229
pwiz::msdata::Spectrum::precursors
std::vector< Precursor > precursors
list and descriptions of precursors to the spectrum currently being described.
Definition: MSData.hpp:520
pwiz::msdata::Precursor::Precursor
Precursor()
Definition: MSData.hpp:334
pwiz::msdata::Component::Component
Component(ComponentType type, int order)
Definition: MSData.hpp:140
pwiz::msdata::DetailLevel_FullData
@ DetailLevel_FullData
Definition: MSData.hpp:635
pwiz::msdata::MSData
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:849
pwiz::msdata::DataProcessing
Description of the way in which a particular software was used.
Definition: MSData.hpp:273
BinaryData.hpp
pwiz::msdata::id::abbreviate
PWIZ_API_DECL std::string abbreviate(const std::string &id, char delimiter='.')
abbreviates a nativeID ("name1=value1 name2=value2" translates to "value1.value2")
pwiz::msdata::ChromatogramPtr
boost::shared_ptr< Chromatogram > ChromatogramPtr
Definition: MSData.hpp:624
pwiz::msdata::MZIntensityPair
The data point type of a mass spectrum.
Definition: MSData.hpp:422
pwiz::msdata::id::valueAs
value_type valueAs(const std::string &id, const std::string &name)
templated convenience function to extract a named value from an id string
Definition: MSData.hpp:926
pwiz::msdata::id::getDefaultNativeIDFormat
PWIZ_API_DECL CVID getDefaultNativeIDFormat(const MSData &msd)
returns the nativeID format from the defaultSourceFilePtr if set, or from sourceFilePtrs[0] if the li...
pwiz::msdata::Run::samplePtr
SamplePtr samplePtr
this attribute MUST reference the 'id' of the appropriate sample.
Definition: MSData.hpp:818
pwiz::msdata::Precursor::selectedIons
std::vector< SelectedIon > selectedIons
this list of precursor ions that were selected.
Definition: MSData.hpp:329
pwiz::msdata::ChromatogramList
Interface for accessing chromatograms, which may be stored in memory or backed by a data file (RAW,...
Definition: MSData.hpp:756
pwiz::msdata::MZIntensityPair::mz
double mz
Definition: MSData.hpp:424
pwiz::msdata::DetailLevel
DetailLevel
Definition: MSData.hpp:630
pwiz::msdata::InstrumentConfigurationPtr
boost::shared_ptr< InstrumentConfiguration > InstrumentConfigurationPtr
Definition: MSData.hpp:250
pwiz::msdata::Precursor
The method of precursor ion selection and activation.
Definition: MSData.hpp:311
pwiz::msdata::Scan::externalSpectrumID
std::string externalSpectrumID
for scans that are external to this document, this string must correspond to the 'id' attribute of a ...
Definition: MSData.hpp:377
pwiz::msdata::Spectrum::defaultArrayLength
size_t defaultArrayLength
default length of binary data arrays contained in this element.
Definition: MSData.hpp:508
pwiz::msdata::SpectrumListSimple::spectra
std::vector< SpectrumPtr > spectra
Definition: MSData.hpp:718
pwiz::data::CVParam
represents a tag-value pair, where the tag comes from the controlled vocabulary
Definition: ParamTypes.hpp:44
pwiz::msdata::Chromatogram::precursor
Precursor precursor
description of precursor ion information (i.e. Q1 settings)
Definition: MSData.hpp:586
pwiz::msdata::Chromatogram::Chromatogram
Chromatogram()
Definition: MSData.hpp:594
pwiz::msdata::ChromatogramIdentity::ChromatogramIdentity
ChromatogramIdentity()
Definition: MSData.hpp:500
pwiz::msdata::Run::defaultInstrumentConfigurationPtr
InstrumentConfigurationPtr defaultInstrumentConfigurationPtr
this attribute MUST reference the 'id' of the default instrument configuration. If a scan does not re...
Definition: MSData.hpp:815
pwiz::msdata::SpectrumList
Interface for accessing spectra, which may be stored in memory or backed by a data file (RAW,...
Definition: MSData.hpp:660
pwiz::msdata::MZIntensityPair::MZIntensityPair
MZIntensityPair()
Definition: MSData.hpp:427
pwiz::msdata::TimeIntensityPair::time
double time
Definition: MSData.hpp:448
pwiz::msdata::SpectrumListSimplePtr
boost::shared_ptr< SpectrumListSimple > SpectrumListSimplePtr
Definition: MSData.hpp:731
pwiz::msdata::ChromatogramListSimple::chromatograms
std::vector< ChromatogramPtr > chromatograms
Definition: MSData.hpp:792
pwiz::msdata::ProcessingMethod::order
int order
this attributes allows a series of consecutive steps to be placed in the correct order.
Definition: MSData.hpp:257
pwiz::msdata::ChromatogramIdentity::index
size_t index
the zero-based, consecutive index of the chromatogram in the ChromatogramList.
Definition: MSData.hpp:492
pwiz::msdata::Chromatogram::product
Product product
description of product ion information (i.e. Q3 settings)
Definition: MSData.hpp:589
pwiz::msdata::Run::chromatogramListPtr
ChromatogramListPtr chromatogramListPtr
all chromatograms for this run.
Definition: MSData.hpp:830
pwiz::msdata::SoftwarePtr
boost::shared_ptr< Software > SoftwarePtr
Definition: MSData.hpp:198
pwiz::msdata::Spectrum::hasBinaryData
bool hasBinaryData() const
returns true iff has nonnull and nonempty BinaryDataArrayPtr
Definition: MSData.hpp:535
pwiz::msdata::Precursor::sourceFilePtr
SourceFilePtr sourceFilePtr
for precursor spectra that are external to this document, this attribute MUST reference the 'id' attr...
Definition: MSData.hpp:315
pwiz::msdata::MSData::paramGroupPtrs
std::vector< ParamGroupPtr > paramGroupPtrs
container for a list of referenceableParamGroups
Definition: MSData.hpp:865
pwiz::msdata::ChromatogramListSimplePtr
boost::shared_ptr< ChromatogramListSimple > ChromatogramListSimplePtr
Definition: MSData.hpp:805