Go to the documentation of this file.
31 #include "boost/shared_ptr.hpp"
32 #include "boost/iostreams/positioning.hpp"
66 const std::string _name =
"",
67 const std::string _location =
"");
109 Sample(
const std::string _id =
"",
110 const std::string _name =
"");
141 Component(CVID cvid,
int order) { define(cvid, order); }
143 void define(CVID cvid,
int order);
168 const Component& source(
size_t index)
const;
171 const Component& analyzer(
size_t index)
const;
174 const Component& detector(
size_t index)
const;
187 Software(
const std::string& _id =
"");
191 const std::string& _version);
300 explicit SelectedIon(
double mz,
double intensity, CVID intensityUnit);
302 explicit SelectedIon(
double mz,
double intensity,
int chargeState, CVID intensityUnit);
336 explicit Precursor(
double mz,
double intensity, CVID intensityUnit);
338 explicit Precursor(
double mz,
double intensity,
int chargeState, CVID intensityUnit);
364 ScanWindow(
double low,
double high, CVID unit);
428 :
mz(0), intensity(0)
432 :
mz(
mz), intensity(intensity)
452 : time(0), intensity(0)
456 : time(time), intensity(intensity)
536 return binaryDataArrayPtrs.size() &&
537 binaryDataArrayPtrs[0] &&
538 !binaryDataArrayPtrs[0]->data.empty();
542 void getMZIntensityPairs(std::vector<MZIntensityPair>& output)
const;
547 void getMZIntensityPairs(
MZIntensityPair* output,
size_t expectedSize)
const;
559 void setMZIntensityPairs(
const std::vector<MZIntensityPair>& input, CVID intensityUnits);
562 void setMZIntensityPairs(
const MZIntensityPair* input,
size_t size, CVID intensityUnits);
565 void setMZIntensityArrays(
const std::vector<double>& mzArray,
const std::vector<double>& intensityArray, CVID intensityUnits);
600 void getTimeIntensityPairs(std::vector<TimeIntensityPair>& output)
const;
605 void getTimeIntensityPairs(
TimeIntensityPair* output,
size_t expectedSize)
const;
614 void setTimeIntensityPairs(
const std::vector<TimeIntensityPair>& input, CVID timeUnits, CVID intensityUnits);
617 void setTimeIntensityPairs(
const TimeIntensityPair* input,
size_t size, CVID timeUnits, CVID intensityUnits);
620 void setTimeIntensityArrays(
const std::vector<double>& timeArray,
const std::vector<double>& intensityArray, CVID timeUnits, CVID intensityUnits);
665 virtual size_t size()
const = 0;
668 virtual bool empty()
const;
674 virtual size_t find(
const std::string&
id)
const;
677 virtual size_t findAbbreviated(
const std::string& abbreviatedId,
char delimiter =
'.')
const;
680 virtual IndexList findNameValue(
const std::string& name,
const std::string&
value)
const;
683 virtual IndexList findSpotID(
const std::string& spotID)
const;
688 virtual SpectrumPtr spectrum(
size_t index,
bool getBinaryData =
false)
const = 0;
702 virtual const boost::shared_ptr<const DataProcessing> dataProcessingPtr()
const;
705 virtual void warn_once(
const char* msg)
const;
723 virtual size_t size()
const {
return spectra.size();}
724 virtual bool empty()
const {
return spectra.empty() && !dp.get();}
726 virtual SpectrumPtr spectrum(
size_t index,
bool getBinaryData)
const;
727 virtual const boost::shared_ptr<const DataProcessing> dataProcessingPtr()
const;
761 virtual size_t size()
const = 0;
770 virtual size_t find(
const std::string&
id)
const;
775 virtual ChromatogramPtr chromatogram(
size_t index,
bool getBinaryData =
false)
const = 0;
779 virtual const boost::shared_ptr<const DataProcessing> dataProcessingPtr()
const;
797 virtual size_t size()
const {
return chromatograms.size();}
798 virtual bool empty()
const {
return chromatograms.empty() && !dp.get();}
800 virtual ChromatogramPtr chromatogram(
size_t index,
bool getBinaryData)
const;
801 virtual const boost::shared_ptr<const DataProcessing> dataProcessingPtr()
const;
840 Run& operator=(
const Run&);
844 namespace IO {
struct HandlerMSData;}
883 std::vector<DataProcessingPtr> allDataProcessingPtrs()
const;
895 const std::string& version()
const;
908 friend struct IO::HandlerMSData;
925 template<
typename value_type>
926 value_type
valueAs(
const std::string&
id,
const std::string& name)
928 std::string result =
value(
id, name);
929 return !result.empty() ? boost::lexical_cast<value_type>(result)
930 : boost::lexical_cast<value_type>(0);
959 #endif // _MSDATA_HPP_
boost::shared_ptr< BinaryDataArray > BinaryDataArrayPtr
std::string id
a unique identifier across the samples with which to reference this sample description.
virtual size_t size() const
returns the number of spectra
std::string id
a unique identifier for this chromatogram. It should be expected that external files may use this ide...
This element captures the isolation (or 'selection') window configured to isolate one or more precurs...
std::string name
an optional name for the sample description, mostly intended as a quick mnemonic.
Simple writeable in-memory implementation of ChromatogramList.
boost::shared_ptr< SpectrumList > SpectrumListPtr
std::vector< BinaryDataArrayPtr > binaryDataArrayPtrs
list of binary data arrays.
ComponentList componentList
list with the different components used in the mass spectrometer. At least one source,...
Identifying information for a spectrum.
std::vector< SoftwarePtr > softwarePtrs
list and descriptions of software used to acquire and/or process the data in this mzML file.
The structure that captures the generation of a peak list (including the underlying acquisitions)
PWIZ_API_DECL std::map< std::string, std::string > parse(const std::string &id)
parses an id string into a map<string,string>
Description of the default peak processing method. This element describes the base method used in the...
std::string id
an optional id for the mzML document. It is recommended to use LSIDs when possible.
SoftwarePtr softwarePtr
this attribute MUST reference the 'id' of the appropriate SoftwareType.
Description of the source file, including location and type.
IsolationWindow isolationWindow
this element captures the isolation (or 'selection') window configured to isolate one or more precurs...
std::vector< SourceFilePtr > sourceFilePtrs
container for a list of source file references.
A run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
size_t defaultArrayLength
default length of binary data arrays contained in this element.
PWIZ_API_DECL bool operator==(const TruncatedLorentzianParameters &t, const TruncatedLorentzianParameters &u)
size_t index
the zero-based, consecutive index of the spectrum in the SpectrumList.
boost::shared_ptr< ScanSettings > ScanSettingsPtr
std::string name
name of the source file, without reference to location (either URI or local path).
List and descriptions of scans.
InstrumentConfigurationPtr instrumentConfigurationPtr
this attribute MUST reference the 'id' attribute of the appropriate instrument configuration.
boost::iostreams::stream_offset sourceFilePosition
for file-based MSData implementations, this attribute may refer to the spectrum's position in the fil...
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_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...
std::vector< SourceFilePtr > sourceFilePtrs
list and descriptions of the source files this mzML document was generated or derived from.
std::string accession
an optional accession number for the mzML document.
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
std::vector< ScanWindow > scanWindows
container for a list of select windows.
SourceFilePtr defaultSourceFilePtr
default source file reference
DataProcessingPtr dataProcessingPtr
this optional attribute may reference the 'id' attribute of the appropriate dataProcessing.
DataProcessingPtr dataProcessingPtr
this attribute can optionally reference the 'id' of the appropriate dataProcessing.
std::vector< ProcessingMethod > processingMethods
description of the default peak processing method(s). This element describes the base method used in ...
pwiz::util::BinaryData< double > data
the binary data.
Identifying information for a chromatogram.
std::string spectrumID
reference to the id attribute of the spectrum from which the precursor was selected.
IsolationWindow isolationWindow
this element captures the isolation (or 'selection') window configured to isolate one or more precurs...
std::vector< CV > cvs
container for one or more controlled vocabulary definitions.
List with the different components used in the mass spectrometer. At least one source,...
std::string id
an identifier for this file.
ComponentType type
the type of component (Source, Analyzer, or Detector)
The type and energy level used for activation.
boost::shared_ptr< ChromatogramList > ChromatogramListPtr
int order
this attribute MUST be used to indicate the order in which the components are encountered from source...
std::string spectrumID
for scans that are local to this document, this attribute can be used to reference the 'id' attribute...
@ DetailLevel_FullMetadata
SourceFilePtr sourceFilePtr
this attribute can optionally reference the 'id' of the appropriate sourceFile.
@ DetailLevel_InstantMetadata
std::string id
a unique identifier for this spectrum. It should be expected that external files may use this identif...
std::vector< Target > targets
target list (or 'inclusion list') configured prior to the run.
std::string id
a unique identifier for this data processing that is unique across all DataProcessingTypes.
DataProcessingPtr dataProcessingPtr
this attribute can optionally reference the 'id' of the appropriate dataProcessing.
boost::iostreams::stream_offset sourceFilePosition
for file-based MSData implementations, this attribute may refer to the chromatogram's position in the...
std::string id
a unique identifier for this run.
virtual bool empty() const
returns true iff (size() == 0) and (dataProcessingPtr.get() == NULL)
std::string id
a unique identifier for this acquisition setting.
FileContent fileContent
this summarizes the different types of spectra that can be expected in the file. This is expected to ...
PWIZ_API_DECL std::ostream & operator<<(std::ostream &os, const BinaryDataEncoder::Config &config)
std::string id
an identifier for this instrument configuration.
The base class for elements that may contain cvParams, userParams, or paramGroup references.
FileDescription fileDescription
information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is sto...
boost::shared_ptr< MSData > MSDataPtr
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...
boost::shared_ptr< Sample > SamplePtr
std::string spotID
the identifier for the spot from which this spectrum was derived, if a MALDI or similar run.
std::vector< ScanSettingsPtr > scanSettingsPtrs
list with the descriptions of the acquisition settings applied prior to the start of data acquisition...
virtual bool empty() const
SourceFilePtr sourceFilePtr
if this attribute is set, it must reference the 'id' attribute of a sourceFile representing the exter...
PWIZ_API_DECL std::vector< CV > defaultCVList()
Information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is sto...
std::vector< Product > products
list and descriptions of product ion information
std::string version
the software version.
A component of an instrument corresponding to a source (i.e. ion source), an analyzer (i....
boost::shared_ptr< Spectrum > SpectrumPtr
ScanSettingsPtr scanSettingsPtr
reference to a scan settings element defining global scan settings used by this configuration
std::string location
URI-formatted location where the file was retrieved.
Activation activation
the type and energy level used for activation.
std::vector< BinaryDataArrayPtr > binaryDataArrayPtrs
list of binary data arrays.
Description of the acquisition settings of the instrument prior to the start of the run.
std::vector< Contact > contacts
structure allowing the use of a controlled (cvParam) or uncontrolled vocabulary (userParam),...
int countFiltersApplied() const
std::string id
an identifier for this software that is unique across all SoftwareTypes.
Simple writeable in-memory implementation of SpectrumList.
The data point type of a chromatogram.
ScanList scanList
list of scans
Scan or acquisition from original raw file used to create this peak list, as specified in sourceFile.
boost::shared_ptr< SourceFile > SourceFilePtr
Description of the source file, including location and type.
virtual ~ChromatogramList()
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here....
TimeIntensityPair(double time, double intensity)
std::vector< Scan > scans
std::string startTimeStamp
the optional start timestamp of the run, in UT.
This summarizes the different types of spectra that can be expected in the file. This is expected to ...
Expansible description of the sample used to generate the dataset, named in sampleName.
boost::shared_ptr< DataProcessing > DataProcessingPtr
std::string externalSpectrumID
for precursor spectra that are external to this document, this string MUST correspond to the 'id' att...
std::vector< SamplePtr > samplePtrs
list and descriptions of samples.
@ DetailLevel_FastMetadata
The structure into which encoded binary data goes. Byte ordering is always little endian (Intel style...
boost::shared_ptr< ProcessingMethod > ProcessingMethodPtr
Component(CVID cvid, int order)
double mz(double neutralMass, int protonDelta, int electronDelta=0, int neutronDelta=0)
std::vector< DataProcessingPtr > dataProcessingPtrs
list and descriptions of data processing applied to this data.
MZIntensityPair(double mz, double intensity)
std::vector< InstrumentConfigurationPtr > instrumentConfigurationPtrs
list and descriptions of instrument configurations.
virtual size_t size() const
returns the number of chromatograms
const size_t IDENTITY_INDEX_NONE
SoftwarePtr softwarePtr
reference to a previously defined software element.
Description of a particular hardware configuration of a mass spectrometer. Each configuration MUST ha...
std::vector< Precursor > precursors
list and descriptions of precursors to the spectrum currently being described.
Component(ComponentType type, int order)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Description of the way in which a particular software was used.
PWIZ_API_DECL std::string abbreviate(const std::string &id, char delimiter='.')
abbreviates a nativeID ("name1=value1 name2=value2" translates to "value1.value2")
boost::shared_ptr< Chromatogram > ChromatogramPtr
The data point type of a mass spectrum.
value_type valueAs(const std::string &id, const std::string &name)
templated convenience function to extract a named value from an id string
PWIZ_API_DECL CVID getDefaultNativeIDFormat(const MSData &msd)
returns the nativeID format from the defaultSourceFilePtr if set, or from sourceFilePtrs[0] if the li...
SamplePtr samplePtr
this attribute MUST reference the 'id' of the appropriate sample.
std::vector< SelectedIon > selectedIons
this list of precursor ions that were selected.
Interface for accessing chromatograms, which may be stored in memory or backed by a data file (RAW,...
boost::shared_ptr< InstrumentConfiguration > InstrumentConfigurationPtr
The method of precursor ion selection and activation.
std::string externalSpectrumID
for scans that are external to this document, this string must correspond to the 'id' attribute of a ...
size_t defaultArrayLength
default length of binary data arrays contained in this element.
std::vector< SpectrumPtr > spectra
represents a tag-value pair, where the tag comes from the controlled vocabulary
Precursor precursor
description of precursor ion information (i.e. Q1 settings)
InstrumentConfigurationPtr defaultInstrumentConfigurationPtr
this attribute MUST reference the 'id' of the default instrument configuration. If a scan does not re...
Interface for accessing spectra, which may be stored in memory or backed by a data file (RAW,...
boost::shared_ptr< SpectrumListSimple > SpectrumListSimplePtr
std::vector< ChromatogramPtr > chromatograms
int order
this attributes allows a series of consecutive steps to be placed in the correct order.
size_t index
the zero-based, consecutive index of the chromatogram in the ChromatogramList.
Product product
description of product ion information (i.e. Q3 settings)
ChromatogramListPtr chromatogramListPtr
all chromatograms for this run.
boost::shared_ptr< Software > SoftwarePtr
bool hasBinaryData() const
returns true iff has nonnull and nonempty BinaryDataArrayPtr
SourceFilePtr sourceFilePtr
for precursor spectra that are external to this document, this attribute MUST reference the 'id' attr...
std::vector< ParamGroupPtr > paramGroupPtrs
container for a list of referenceableParamGroups
boost::shared_ptr< ChromatogramListSimple > ChromatogramListSimplePtr