ProteoWizard
TextWriter.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 _TEXTWRITER_HPP_
25#define _TEXTWRITER_HPP_
26
27
29#include "MSData.hpp"
30#include "boost/lexical_cast.hpp"
31#include <iostream>
32#include <string>
33#include <vector>
34
35
36namespace pwiz {
37namespace msdata {
38
39
41{
42 public:
43
44 /// constructs a TextWriter for MSData types
45 /// @param os The ostream to write to.
46 /// @param depth The number of indentations to prefix to each output line.
47 /// @param arrayExampleCount The number of example values to print for arrays (i.e. m/z and intensity); -1 for unlimited
48 TextWriter(std::ostream& os, int depth = 0, int arrayExampleCount = 3)
49 : os_(os),
50 depth_(depth),
51 arrayExampleCount_(arrayExampleCount < 0 ? std::numeric_limits<size_t>::max()
52 : (size_t) arrayExampleCount),
53 indent_(depth*2, ' ')
54 {}
55
56 TextWriter child() {return TextWriter(os_, depth_+1, arrayExampleCount_);}
57
58 TextWriter& operator()(const std::string& text)
59 {
60 os_ << indent_ << text << std::endl;
61 return *this;
62 }
63
64 TextWriter& operator()(const CVParam& cvParam)
65 {
66 os_ << indent_ << "cvParam: " << cvTermInfo(cvParam.cvid).name;
67 if (!cvParam.value.empty())
68 os_ << ", " << cvParam.value;
69 if (cvParam.units != CVID_Unknown)
70 os_ << ", " << cvParam.unitsName();
71 os_ << std::endl;
72 return *this;
73 }
74
75 TextWriter& operator()(const UserParam& userParam)
76 {
77 os_ << indent_ << "userParam: " << userParam.name;
78 if (!userParam.value.empty()) os_ << ", " << userParam.value;
79 if (!userParam.type.empty()) os_ << ", " << userParam.type;
80 if (userParam.units != CVID_Unknown) os_ << ", " << cvTermInfo(userParam.units).name;
81 os_ << std::endl;
82 return *this;
83 }
84
85 template<typename object_type>
86 TextWriter& operator()(const std::string& label, const std::vector<object_type>& v)
87 {
88 (*this)(label);
89 for_each(v.begin(), v.end(), child());
90 return *this;
91 }
92
93
94 TextWriter& operator()(const MSData& msd, bool metadata_only=false)
95 {
96 (*this)("msdata:");
97 child()
98 ("id: " + msd.id);
99 if (!msd.accession.empty())
100 child()("accession: " + msd.accession);
101 if (!msd.version().empty())
102 child()("version: " + msd.version());
103 if (!msd.cvs.empty())
104 child()("cvList: ", msd.cvs);
105 if (!msd.fileDescription.empty())
106 child()(msd.fileDescription);
107 if (!msd.paramGroupPtrs.empty())
108 child()("paramGroupList: ", msd.paramGroupPtrs);
109 if (!msd.samplePtrs.empty())
110 child()("sampleList: " , msd.samplePtrs);
111 if (!msd.softwarePtrs.empty())
112 child()("softwareList: ", msd.softwarePtrs);
113 if (!msd.scanSettingsPtrs.empty())
114 child()("scanSettingsList: ", msd.scanSettingsPtrs);
115 if (!msd.instrumentConfigurationPtrs.empty())
116 child()("instrumentConfigurationList: ", msd.instrumentConfigurationPtrs);
117 if (!msd.dataProcessingPtrs.empty())
118 child()("dataProcessingList: ", msd.dataProcessingPtrs);
119
120 if (!msd.run.empty())
121 child()(msd.run, metadata_only);
122
123 return *this;
124 }
125
127 {
128 (*this)("cv:");
129 child()
130 ("id: " + cv.id)
131 ("fullName: " + cv.fullName)
132 ("version: " + cv.version)
133 ("URI: " + cv.URI);
134 return *this;
135 }
136
138 {
139 (*this)("fileDescription:");
140 child()
141 (fd.fileContent)
142 ("sourceFileList: ", fd.sourceFilePtrs);
143 for_each(fd.contacts.begin(), fd.contacts.end(), child());
144 return *this;
145 }
146
147 TextWriter& operator()(const ParamContainer& paramContainer)
148 {
149 for (std::vector<ParamGroupPtr>::const_iterator it=paramContainer.paramGroupPtrs.begin();
150 it!=paramContainer.paramGroupPtrs.end(); ++it)
151 (*this)("referenceableParamGroupRef: " + (*it)->id);
152 for_each(paramContainer.cvParams.begin(), paramContainer.cvParams.end(), *this);
153 for_each(paramContainer.userParams.begin(), paramContainer.userParams.end(), *this);
154 return *this;
155 }
156
157 TextWriter& operator()(const FileContent& fileContent)
158 {
159 (*this)("fileContent:");
160 child()(static_cast<const ParamContainer&>(fileContent));
161 return *this;
162 }
163
165 {
166 (*this)("sourceFile:");
167 child()
168 ("id: " + sf.id)
169 ("name: " + sf.name)
170 ("location: " + sf.location)
171 (static_cast<const ParamContainer&>(sf));
172 return *this;
173 }
174
176 {
177 (*this)("contact:");
178 child()(static_cast<const ParamContainer&>(contact));
179 return *this;
180 }
181
182 TextWriter& operator()(const ParamGroup& paramGroup)
183 {
184 (*this)("paramGroup:");
185 child()
186 ("id: " + paramGroup.id)
187 (static_cast<const ParamContainer&>(paramGroup));
188 return *this;
189 }
190
192 {
193 (*this)("sample:");
194 child()
195 ("id: " + sample.id)
196 ("name: " + sample.name)
197 (static_cast<const ParamContainer&>(sample));
198 return *this;
199 }
200
201 TextWriter& operator()(const InstrumentConfiguration& instrumentConfiguration)
202 {
203 (*this)("instrumentConfiguration:");
204 child()
205 ("id: " + instrumentConfiguration.id)
206 (static_cast<const ParamContainer&>(instrumentConfiguration));
207 if (!instrumentConfiguration.componentList.empty())
208 child()(instrumentConfiguration.componentList);
209 if (instrumentConfiguration.softwarePtr.get() && !instrumentConfiguration.softwarePtr->empty())
210 child()("softwareRef: " + instrumentConfiguration.softwarePtr->id);
211 return *this;
212 }
213
214 TextWriter& operator()(const ComponentList& componentList)
215 {
216 (*this)("componentList:");
217 for (size_t i=0; i < componentList.size(); ++i)
218 child()(componentList[i]);
219 return *this;
220 }
221
222 TextWriter& operator()(const Component& component)
223 {
224 switch(component.type)
225 {
227 (*this)("source: ");
228 break;
230 (*this)("analyzer: ");
231 break;
233 (*this)("detector: ");
234 break;
235 default:
236 break;
237 }
238 child()
239 ("order: " + boost::lexical_cast<std::string>(component.order))
240 (static_cast<const ParamContainer&>(component));
241 return *this;
242 }
243
245 {
246 (*this)("software:");
247 child()
248 ("id: " + software.id)
249 ("version: " + software.version)
250 (static_cast<const ParamContainer&>(software));
251 return *this;
252 }
253
254 TextWriter& operator()(const ProcessingMethod& processingMethod)
255 {
256 (*this)("processingMethod:");
257 child()
258 ("order: " + boost::lexical_cast<std::string>(processingMethod.order));
259 if (processingMethod.softwarePtr.get() && !processingMethod.softwarePtr->empty())
260 child()("softwareRef: " + processingMethod.softwarePtr->id);
261 child()
262 (static_cast<const ParamContainer&>(processingMethod));
263 return *this;
264 }
265
267 {
268 (*this)("dataProcessing:");
269 child()
270 ("id: " + dp.id);
271 for_each(dp.processingMethods.begin(), dp.processingMethods.end(), child());
272 return *this;
273 }
274
276 {
277 (*this)("target:");
278 child()(static_cast<const ParamContainer&>(target));
279 return *this;
280 }
281
283 {
284 (*this)("scanSettings:");
285 child()
286 ("id: " + as.id);
287 for_each(as.targets.begin(), as.targets.end(), child());
288 child()("sourceFileList: ", as.sourceFilePtrs);
289 return *this;
290 }
291
292 TextWriter& operator()(const Run& run, bool metadata_only=false)
293 {
294 (*this)("run:");
295 child()("id: " + run.id);
297 child()("defaultInstrumentConfigurationRef: " + run.defaultInstrumentConfigurationPtr->id);
298 if (run.samplePtr.get())
299 child()("sampleRef: " + run.samplePtr->id);
300 if (!run.startTimeStamp.empty())
301 child()("startTimeStamp: " + run.startTimeStamp);
302 child()(static_cast<const ParamContainer&>(run));
303 if (run.defaultSourceFilePtr.get())
304 child()("defaultSourceFileRef: " + run.defaultSourceFilePtr->id);
305 if (run.spectrumListPtr.get())
306 child()(run.spectrumListPtr, metadata_only);
307 if (run.chromatogramListPtr.get())
308 child()(run.chromatogramListPtr, metadata_only);
309 return *this;
310 }
311
312 TextWriter& operator()(const SpectrumList& spectrumList, bool metadata_only=false)
313 {
314 std::string text("spectrumList (" + boost::lexical_cast<std::string>(spectrumList.size()) + " spectra)");
315 if (!metadata_only)
316 text += ":";
317
318 (*this)(text);
319
320 if (spectrumList.dataProcessingPtr().get())
321 child()(*spectrumList.dataProcessingPtr());
322
323 if (!metadata_only)
324 for (size_t index=0; index<spectrumList.size(); ++index)
325 child()
326 (*spectrumList.spectrum(index, true));
327 return *this;
328 }
329
330 TextWriter& operator()(const SpectrumListPtr& p, bool metadata_only=false)
331 {
332 return p.get() ? (*this)(*p, metadata_only) : *this;
333 }
334
335 TextWriter& operator()(const ChromatogramList& chromatogramList, bool metadata_only=false)
336 {
337 std::string text("chromatogramList (" + boost::lexical_cast<std::string>(chromatogramList.size()) + " chromatograms)");
338 if (!metadata_only)
339 text += ":";
340
341 (*this)(text);
342
343 if (chromatogramList.dataProcessingPtr().get())
344 child()(*chromatogramList.dataProcessingPtr());
345
346 if (!metadata_only)
347 for (size_t index=0; index<chromatogramList.size(); ++index)
348 child()
349 (*chromatogramList.chromatogram(index, true));
350 return *this;
351 }
352
353 TextWriter& operator()(const ChromatogramListPtr& p, bool metadata_only=false)
354 {
355 return p.get() ? (*this)(*p, metadata_only) : *this;
356 }
357
359 {
360 (*this)("spectrum:");
361 child()
362 ("index: " + boost::lexical_cast<std::string>(spectrum.index))
363 ("id: " + spectrum.id);
364 if (!spectrum.spotID.empty())
365 child()("spotID: " + spectrum.spotID);
366 if (spectrum.sourceFilePtr.get())
367 child()(spectrum.sourceFilePtr);
368 child()
369 ("defaultArrayLength: " + boost::lexical_cast<std::string>(spectrum.defaultArrayLength))
370 (spectrum.dataProcessingPtr)
371 (static_cast<const ParamContainer&>(spectrum));
372 if (!spectrum.scanList.empty())
373 child()(spectrum.scanList);
374 if (!spectrum.precursors.empty())
375 child()("precursorList: ", spectrum.precursors);
376 for_each(spectrum.binaryDataArrayPtrs.begin(), spectrum.binaryDataArrayPtrs.end(), child());
377 return *this;
378 }
379
380 TextWriter& operator()(const Chromatogram& chromatogram)
381 {
382 (*this)("chromatogram:");
383 child()
384 ("index: " + boost::lexical_cast<std::string>(chromatogram.index))
385 ("id: " + chromatogram.id)
386 ("defaultArrayLength: " + boost::lexical_cast<std::string>(chromatogram.defaultArrayLength))
387 (chromatogram.dataProcessingPtr)
388 (static_cast<const ParamContainer&>(chromatogram));
389 if (!chromatogram.precursor.empty())
390 child()(chromatogram.precursor);
391 if (!chromatogram.product.empty())
392 child()(chromatogram.product);
393 for_each(chromatogram.binaryDataArrayPtrs.begin(), chromatogram.binaryDataArrayPtrs.end(), child());
394 return *this;
395 }
396
398 {
399 (*this)("scan:");
400 if (!scan.spectrumID.empty()) child()("spectrumID: " + scan.spectrumID);
401 if (!scan.externalSpectrumID.empty()) child()("externalSpectrumID: " + scan.externalSpectrumID);
402 if (scan.sourceFilePtr) child()(*scan.sourceFilePtr);
403 if (scan.instrumentConfigurationPtr.get()) child()(*scan.instrumentConfigurationPtr);
404 child()(static_cast<const ParamContainer&>(scan));
405 if (!scan.scanWindows.empty())
406 child()("scanWindowList: ", scan.scanWindows);
407 return *this;
408 }
409
411 {
412 (*this)("scanWindow:");
413 for_each(window.cvParams.begin(), window.cvParams.end(), child());
414 return *this;
415 }
416
418 {
419 if (!p.get() || p->empty()) return *this;
420
421 std::stringstream oss;
422 oss << "[" << boost::lexical_cast<std::string>(p->data.size()) << "] ";
423 oss.precision(12);
424 for (size_t i=0; i < arrayExampleCount_ && i < p->data.size(); i++)
425 oss << p->data[i] << " ";
426 if (p->data.size() > arrayExampleCount_)
427 oss << "...";
428
429 (*this)("binaryDataArray:");
430 child() (static_cast<const ParamContainer&>(*p));
431 if (p->dataProcessingPtr.get() && !p->dataProcessingPtr->empty())
432 child()(p->dataProcessingPtr);
433 if (!p->data.empty())
434 child()("binary: " + oss.str());
435 return *this;
436 }
437
438 TextWriter& operator()(const SelectedIon& selectedIon)
439 {
440 (*this)("selectedIon:");
441 child()(static_cast<const ParamContainer&>(selectedIon));
442 return *this;
443 }
444
445 TextWriter& operator()(const Precursor& precursor)
446 {
447 (*this)("precursor:");
448 child()
449 ("spectrumRef: " + precursor.spectrumID)
450 (static_cast<const ParamContainer&>(precursor));
451
452 if (!precursor.isolationWindow.empty())
453 {
454 child()("isolationWindow:");
455 child().child()(precursor.isolationWindow);
456 }
457
458 if (!precursor.selectedIons.empty())
459 {
460 child()("selectedIons:", precursor.selectedIons);
461 }
462
463 if (!precursor.activation.empty())
464 {
465 child()("activation:");
466 child().child()(precursor.activation);
467 }
468
469 return *this;
470 }
471
473 {
474 (*this)("product:");
475
476 if (!product.isolationWindow.empty())
477 {
478 child()("isolationWindow:");
479 child().child()(product.isolationWindow);
480 }
481
482 return *this;
483 }
484
486 {
487 (*this)
488 (static_cast<const ParamContainer&>(scanList))
489 ("scanList:", scanList.scans);
490 return *this;
491 }
492
493 // if no other overload matches, assume the object is a shared_ptr of a valid overloaded type
494 template<typename object_type>
495 TextWriter& operator()(const boost::shared_ptr<object_type>& p)
496 {
497 return p.get() ? (*this)(*p) : *this;
498 }
499
500
501 private:
502 std::ostream& os_;
505 std::string indent_;
506};
507
508
509} // namespace msdata
510} // namespace pwiz
511
512
513#endif // _TEXTWRITER_HPP_
514
#define PWIZ_API_DECL
Definition Export.hpp:32
Interface for accessing chromatograms, which may be stored in memory or backed by a data file (RAW,...
Definition MSData.hpp:757
virtual size_t size() const =0
returns the number of chromatograms
virtual ChromatogramPtr chromatogram(size_t index, bool getBinaryData=false) const =0
retrieve a chromatogram by index
virtual const boost::shared_ptr< const DataProcessing > dataProcessingPtr() const
returns the data processing affecting spectra retrieved through this interface
Interface for accessing spectra, which may be stored in memory or backed by a data file (RAW,...
Definition MSData.hpp:661
virtual const boost::shared_ptr< const DataProcessing > dataProcessingPtr() const
returns the data processing affecting spectra retrieved through this interface
virtual size_t size() const =0
returns the number of spectra
virtual SpectrumPtr spectrum(size_t index, bool getBinaryData=false) const =0
retrieve a spectrum by index
TextWriter & operator()(const BinaryDataArrayPtr &p)
TextWriter & operator()(const ParamContainer &paramContainer)
TextWriter & operator()(const Contact &contact)
TextWriter & operator()(const SelectedIon &selectedIon)
TextWriter & operator()(const ComponentList &componentList)
TextWriter & operator()(const ParamGroup &paramGroup)
TextWriter & operator()(const ChromatogramListPtr &p, bool metadata_only=false)
TextWriter & operator()(const ProcessingMethod &processingMethod)
TextWriter & operator()(const InstrumentConfiguration &instrumentConfiguration)
TextWriter & operator()(const Target &target)
TextWriter & operator()(const Spectrum &spectrum)
TextWriter & operator()(const Chromatogram &chromatogram)
TextWriter & operator()(const Run &run, bool metadata_only=false)
TextWriter & operator()(const MSData &msd, bool metadata_only=false)
TextWriter & operator()(const SourceFile &sf)
TextWriter & operator()(const Scan &scan)
TextWriter & operator()(const ScanSettings &as)
TextWriter & operator()(const SpectrumListPtr &p, bool metadata_only=false)
TextWriter & operator()(const SpectrumList &spectrumList, bool metadata_only=false)
TextWriter & operator()(const CV &cv)
TextWriter & operator()(const DataProcessing &dp)
TextWriter & operator()(const Component &component)
TextWriter & operator()(const CVParam &cvParam)
TextWriter & operator()(const FileContent &fileContent)
TextWriter & operator()(const std::string &label, const std::vector< object_type > &v)
TextWriter(std::ostream &os, int depth=0, int arrayExampleCount=3)
constructs a TextWriter for MSData types
TextWriter & operator()(const boost::shared_ptr< object_type > &p)
TextWriter & operator()(const Sample &sample)
TextWriter & operator()(const UserParam &userParam)
TextWriter & operator()(const Precursor &precursor)
TextWriter & operator()(const Software &software)
TextWriter & operator()(const ScanList &scanList)
TextWriter & operator()(const std::string &text)
TextWriter & operator()(const Product &product)
TextWriter & operator()(const ChromatogramList &chromatogramList, bool metadata_only=false)
TextWriter & operator()(const ScanWindow &window)
TextWriter & operator()(const FileDescription &fd)
CVID_Unknown
Definition cv.hpp:114
PWIZ_API_DECL const CVTermInfo & cvTermInfo(CVID cvid)
returns CV term info for the specified CVID
PWIZ_API_DECL const CV & cv(const std::string &prefix)
returns a CV object for the specified namespace (prefix); currently supported namespaces are: MS UO
@ ComponentType_Analyzer
Definition MSData.hpp:125
@ ComponentType_Detector
Definition MSData.hpp:126
@ ComponentType_Source
Definition MSData.hpp:124
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition MSData.hpp:711
boost::shared_ptr< BinaryDataArray > BinaryDataArrayPtr
Definition MSData.hpp:417
boost::shared_ptr< ChromatogramList > ChromatogramListPtr
Definition MSData.hpp:785
STL namespace.
Information about an ontology or CV source and a short 'lookup' tag to refer to.
Definition cv.hpp:14916
std::string id
the short label to be used as a reference tag with which to refer to this particular Controlled Vocab...
Definition cv.hpp:14918
std::string fullName
the usual name for the resource (e.g. The PSI-MS Controlled Vocabulary).
Definition cv.hpp:14924
std::string URI
the URI for the resource.
Definition cv.hpp:14921
std::string version
the version of the CV from which the referred-to terms are drawn.
Definition cv.hpp:14927
std::string name
Definition cv.hpp:14947
represents a tag-value pair, where the tag comes from the controlled vocabulary
std::string unitsName() const
convenience function to return string for the units
The base class for elements that may contain cvParams, userParams, or paramGroup references.
bool empty() const
returns true iff the element contains no params or param groups
std::vector< ParamGroupPtr > paramGroupPtrs
a collection of references to ParamGroups
std::vector< CVParam > cvParams
a collection of controlled vocabulary terms
std::vector< UserParam > userParams
a collection of uncontrolled user terms
A collection of CVParam and UserParam elements that can be referenced from elsewhere in this mzML doc...
std::string id
the identifier with which to reference this ReferenceableParamGroup.
Uncontrolled user parameters (essentially allowing free text). Before using these,...
CVID units
an optional CV parameter for the unit term associated with the value, if any (e.g....
std::string value
the value for the parameter, where appropriate.
std::string name
the name for the parameter.
std::string type
the datatype of the parameter, where appropriate (e.g.: xsd:float).
A single chromatogram.
Definition MSData.hpp:578
DataProcessingPtr dataProcessingPtr
this attribute can optionally reference the 'id' of the appropriate dataProcessing.
Definition MSData.hpp:583
std::vector< BinaryDataArrayPtr > binaryDataArrayPtrs
list of binary data arrays.
Definition MSData.hpp:592
Precursor precursor
description of precursor ion information (i.e. Q1 settings)
Definition MSData.hpp:586
size_t defaultArrayLength
default length of binary data arrays contained in this element.
Definition MSData.hpp:580
Product product
description of product ion information (i.e. Q3 settings)
Definition MSData.hpp:589
std::string id
a unique identifier for this chromatogram. It should be expected that external files may use this ide...
Definition MSData.hpp:495
size_t index
the zero-based, consecutive index of the chromatogram in the ChromatogramList.
Definition MSData.hpp:492
A component of an instrument corresponding to a source (i.e. ion source), an analyzer (i....
Definition MSData.hpp:132
ComponentType type
the type of component (Source, Analyzer, or Detector)
Definition MSData.hpp:134
int order
this attribute MUST be used to indicate the order in which the components are encountered from source...
Definition MSData.hpp:137
List with the different components used in the mass spectrometer. At least one source,...
Definition MSData.hpp:157
Structure allowing the use of a controlled (cvParam) or uncontrolled vocabulary (userParam),...
Definition MSData.hpp:80
Description of the way in which a particular software was used.
Definition MSData.hpp:274
std::vector< ProcessingMethod > processingMethods
description of the default peak processing method(s). This element describes the base method used in ...
Definition MSData.hpp:279
std::string id
a unique identifier for this data processing that is unique across all DataProcessingTypes.
Definition MSData.hpp:276
This summarizes the different types of spectra that can be expected in the file. This is expected to ...
Definition MSData.hpp:50
Information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is sto...
Definition MSData.hpp:85
std::vector< Contact > contacts
structure allowing the use of a controlled (cvParam) or uncontrolled vocabulary (userParam),...
Definition MSData.hpp:93
FileContent fileContent
this summarizes the different types of spectra that can be expected in the file. This is expected to ...
Definition MSData.hpp:87
bool empty() const
returns true iff all members are empty or null
std::vector< SourceFilePtr > sourceFilePtrs
list and descriptions of the source files this mzML document was generated or derived from.
Definition MSData.hpp:90
Description of a particular hardware configuration of a mass spectrometer. Each configuration MUST ha...
Definition MSData.hpp:230
ComponentList componentList
list with the different components used in the mass spectrometer. At least one source,...
Definition MSData.hpp:235
std::string id
an identifier for this instrument configuration.
Definition MSData.hpp:232
SoftwarePtr softwarePtr
reference to a previously defined software element.
Definition MSData.hpp:238
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition MSData.hpp:850
std::vector< ScanSettingsPtr > scanSettingsPtrs
list with the descriptions of the acquisition settings applied prior to the start of data acquisition...
Definition MSData.hpp:874
const std::string & version() const
returns the version of this mzML document; for a document created programmatically,...
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
Definition MSData.hpp:886
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
std::string accession
an optional accession number for the mzML document.
Definition MSData.hpp:852
std::string id
an optional id for the mzML document. It is recommended to use LSIDs when possible.
Definition MSData.hpp:855
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
std::vector< InstrumentConfigurationPtr > instrumentConfigurationPtrs
list and descriptions of instrument configurations.
Definition MSData.hpp:877
std::vector< ParamGroupPtr > paramGroupPtrs
container for a list of referenceableParamGroups
Definition MSData.hpp:865
std::vector< SamplePtr > samplePtrs
list and descriptions of samples.
Definition MSData.hpp:868
std::vector< DataProcessingPtr > dataProcessingPtrs
list and descriptions of data processing applied to this data.
Definition MSData.hpp:880
std::vector< CV > cvs
container for one or more controlled vocabulary definitions.
Definition MSData.hpp:859
The method of precursor ion selection and activation.
Definition MSData.hpp:312
bool empty() const
returns true iff the element contains no params and all members are empty or null
std::vector< SelectedIon > selectedIons
this list of precursor ions that were selected.
Definition MSData.hpp:329
IsolationWindow isolationWindow
this element captures the isolation (or 'selection') window configured to isolate one or more precurs...
Definition MSData.hpp:326
Activation activation
the type and energy level used for activation.
Definition MSData.hpp:332
std::string spectrumID
reference to the id attribute of the spectrum from which the precursor was selected.
Definition MSData.hpp:323
Description of the default peak processing method. This element describes the base method used in the...
Definition MSData.hpp:255
int order
this attributes allows a series of consecutive steps to be placed in the correct order.
Definition MSData.hpp:257
SoftwarePtr softwarePtr
this attribute MUST reference the 'id' of the appropriate SoftwareType.
Definition MSData.hpp:260
product ion information
Definition MSData.hpp:348
bool empty() const
returns true iff the element contains no params and all members are empty or null
IsolationWindow isolationWindow
this element captures the isolation (or 'selection') window configured to isolate one or more precurs...
Definition MSData.hpp:350
A run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
Definition MSData.hpp:810
SourceFilePtr defaultSourceFilePtr
default source file reference
Definition MSData.hpp:824
std::string id
a unique identifier for this run.
Definition MSData.hpp:812
std::string startTimeStamp
the optional start timestamp of the run, in UT.
Definition MSData.hpp:821
InstrumentConfigurationPtr defaultInstrumentConfigurationPtr
this attribute MUST reference the 'id' of the default instrument configuration. If a scan does not re...
Definition MSData.hpp:815
SamplePtr samplePtr
this attribute MUST reference the 'id' of the appropriate sample.
Definition MSData.hpp:818
ChromatogramListPtr chromatogramListPtr
all chromatograms for this run.
Definition MSData.hpp:830
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here....
Definition MSData.hpp:827
bool empty() const
Expansible description of the sample used to generate the dataset, named in sampleName.
Definition MSData.hpp:102
std::string name
an optional name for the sample description, mostly intended as a quick mnemonic.
Definition MSData.hpp:107
std::string id
a unique identifier across the samples with which to reference this sample description.
Definition MSData.hpp:104
Scan or acquisition from original raw file used to create this peak list, as specified in sourceFile.
Definition MSData.hpp:370
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
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
InstrumentConfigurationPtr instrumentConfigurationPtr
this attribute MUST reference the 'id' attribute of the appropriate instrument configuration.
Definition MSData.hpp:384
SourceFilePtr sourceFilePtr
if this attribute is set, it must reference the 'id' attribute of a sourceFile representing the exter...
Definition MSData.hpp:373
std::vector< ScanWindow > scanWindows
container for a list of select windows.
Definition MSData.hpp:387
List and descriptions of scans.
Definition MSData.hpp:396
std::vector< Scan > scans
Definition MSData.hpp:397
Description of the acquisition settings of the instrument prior to the start of the run.
Definition MSData.hpp:207
std::vector< Target > targets
target list (or 'inclusion list') configured prior to the run.
Definition MSData.hpp:215
std::string id
a unique identifier for this acquisition setting.
Definition MSData.hpp:209
std::vector< SourceFilePtr > sourceFilePtrs
container for a list of source file references.
Definition MSData.hpp:212
A piece of software.
Definition MSData.hpp:180
std::string id
an identifier for this software that is unique across all SoftwareTypes.
Definition MSData.hpp:182
std::string version
the software version.
Definition MSData.hpp:185
Description of the source file, including location and type.
Definition MSData.hpp:55
std::string name
name of the source file, without reference to location (either URI or local path).
Definition MSData.hpp:60
std::string location
URI-formatted location where the file was retrieved.
Definition MSData.hpp:63
std::string id
an identifier for this file.
Definition MSData.hpp:57
The structure that captures the generation of a peak list (including the underlying acquisitions)
Definition MSData.hpp:506
SourceFilePtr sourceFilePtr
this attribute can optionally reference the 'id' of the appropriate sourceFile.
Definition MSData.hpp:514
DataProcessingPtr dataProcessingPtr
this attribute can optionally reference the 'id' of the appropriate dataProcessing.
Definition MSData.hpp:511
size_t defaultArrayLength
default length of binary data arrays contained in this element.
Definition MSData.hpp:508
ScanList scanList
list of scans
Definition MSData.hpp:517
std::vector< BinaryDataArrayPtr > binaryDataArrayPtrs
list of binary data arrays.
Definition MSData.hpp:526
std::vector< Precursor > precursors
list and descriptions of precursors to the spectrum currently being described.
Definition MSData.hpp:520
std::string id
a unique identifier for this spectrum. It should be expected that external files may use this identif...
Definition MSData.hpp:476
std::string spotID
the identifier for the spot from which this spectrum was derived, if a MALDI or similar run.
Definition MSData.hpp:479
size_t index
the zero-based, consecutive index of the spectrum in the SpectrumList.
Definition MSData.hpp:473