30 #include "boost/shared_ptr.hpp" 31 #include "boost/iostreams/positioning.hpp" 65 const std::string _name =
"",
66 const std::string _location =
"");
108 Sample(
const std::string _id =
"",
109 const std::string _name =
"");
140 Component(CVID cvid,
int order) { define(cvid, order); }
142 void define(CVID cvid,
int order);
167 const Component& source(
size_t index)
const;
170 const Component& analyzer(
size_t index)
const;
173 const Component& detector(
size_t index)
const;
186 Software(
const std::string& _id =
"");
190 const std::string& _version);
299 explicit SelectedIon(
double mz,
double intensity, CVID intensityUnit);
301 explicit SelectedIon(
double mz,
double intensity,
int chargeState, CVID intensityUnit);
335 explicit Precursor(
double mz,
double intensity, CVID intensityUnit);
336 explicit Precursor(
double mz,
int chargeState);
337 explicit Precursor(
double mz,
double intensity,
int chargeState, CVID intensityUnit);
363 ScanWindow(
double low,
double high, CVID unit);
427 : mz(0), intensity(0)
431 : mz(mz), intensity(intensity)
451 : time(0), intensity(0)
455 : time(time), intensity(intensity)
535 return binaryDataArrayPtrs.size() &&
536 binaryDataArrayPtrs[0] &&
537 !binaryDataArrayPtrs[0]->data.empty();
541 void getMZIntensityPairs(std::vector<MZIntensityPair>& output)
const;
546 void getMZIntensityPairs(
MZIntensityPair* output,
size_t expectedSize)
const;
549 BinaryDataArrayPtr getMZArray()
const;
552 BinaryDataArrayPtr getIntensityArray()
const;
555 void setMZIntensityPairs(
const std::vector<MZIntensityPair>& input, CVID intensityUnits);
558 void setMZIntensityPairs(
const MZIntensityPair* input,
size_t size, CVID intensityUnits);
561 void setMZIntensityArrays(
const std::vector<double>& mzArray,
const std::vector<double>& intensityArray, CVID intensityUnits);
565 void swapMZIntensityArrays(std::vector<double>& mzArray, std::vector<double>& intensityArray, CVID intensityUnits);
596 void getTimeIntensityPairs(std::vector<TimeIntensityPair>& output)
const;
601 void getTimeIntensityPairs(
TimeIntensityPair* output,
size_t expectedSize)
const;
604 BinaryDataArrayPtr getTimeArray()
const;
607 BinaryDataArrayPtr getIntensityArray()
const;
610 void setTimeIntensityPairs(
const std::vector<TimeIntensityPair>& input, CVID timeUnits, CVID intensityUnits);
613 void setTimeIntensityPairs(
const TimeIntensityPair* input,
size_t size, CVID timeUnits, CVID intensityUnits);
616 void setTimeIntensityArrays(
const std::vector<double>& timeArray,
const std::vector<double>& intensityArray, CVID timeUnits, CVID intensityUnits);
661 virtual size_t size()
const = 0;
664 virtual bool empty()
const;
670 virtual size_t find(
const std::string&
id)
const;
673 virtual size_t findAbbreviated(
const std::string& abbreviatedId,
char delimiter =
'.')
const;
676 virtual IndexList findNameValue(
const std::string& name,
const std::string&
value)
const;
679 virtual IndexList findSpotID(
const std::string& spotID)
const;
684 virtual SpectrumPtr spectrum(
size_t index,
bool getBinaryData =
false)
const = 0;
689 virtual SpectrumPtr spectrum(
const SpectrumPtr& seed,
bool getBinaryData)
const;
694 virtual SpectrumPtr spectrum(
size_t index,
DetailLevel detailLevel)
const;
698 virtual const boost::shared_ptr<const DataProcessing> dataProcessingPtr()
const;
701 virtual void warn_once(
const char* msg)
const;
715 DataProcessingPtr
dp;
719 virtual size_t size()
const {
return spectra.size();}
720 virtual bool empty()
const {
return spectra.empty() && !dp.get();}
722 virtual SpectrumPtr spectrum(
size_t index,
bool getBinaryData)
const;
723 virtual const boost::shared_ptr<const DataProcessing> dataProcessingPtr()
const;
757 virtual size_t size()
const = 0;
766 virtual size_t find(
const std::string&
id)
const;
771 virtual ChromatogramPtr chromatogram(
size_t index,
bool getBinaryData =
false)
const = 0;
775 virtual const boost::shared_ptr<const DataProcessing> dataProcessingPtr()
const;
789 DataProcessingPtr
dp;
793 virtual size_t size()
const {
return chromatograms.size();}
794 virtual bool empty()
const {
return chromatograms.empty() && !dp.get();}
796 virtual ChromatogramPtr chromatogram(
size_t index,
bool getBinaryData)
const;
797 virtual const boost::shared_ptr<const DataProcessing> dataProcessingPtr()
const;
836 Run& operator=(
const Run&);
840 namespace IO {
struct HandlerMSData;}
879 std::vector<DataProcessingPtr> allDataProcessingPtrs()
const;
891 const std::string& version()
const;
904 friend struct IO::HandlerMSData;
921 template<
typename value_type>
922 value_type
valueAs(
const std::string&
id,
const std::string& name)
924 std::string result =
value(
id, name);
926 : boost::lexical_cast<value_type>(0);
955 #endif // _MSDATA_HPP_
IsolationWindow isolationWindow
this element captures the isolation (or 'selection') window configured to isolate one or more precurs...
std::vector< Product > products
list and descriptions of product ion information
This summarizes the different types of spectra that can be expected in the file. This is expected to ...
The type and energy level used for activation.
Interface for accessing chromatograms, which may be stored in memory or backed by a data file (RAW...
std::string id
a unique identifier for this chromatogram. It should be expected that external files may use this ide...
std::vector< SourceFilePtr > sourceFilePtrs
list and descriptions of the source files this mzML document was generated or derived from...
PWIZ_API_DECL std::string abbreviate(const std::string &id, char delimiter='.')
abbreviates a nativeID ("name1=value1 name2=value2" translates to "value1.value2") ...
Description of the way in which a particular software was used.
ComponentList componentList
list with the different components used in the mass spectrometer. At least one source, one mass analyzer and one detector need to be specified.
virtual size_t size() const
returns the number of spectra
ScanList scanList
list of scans
const size_t IDENTITY_INDEX_NONE
boost::shared_ptr< ProcessingMethod > ProcessingMethodPtr
boost::shared_ptr< Software > SoftwarePtr
Description of the source file, including location and type.
PWIZ_API_DECL std::ostream & operator<<(std::ostream &os, const BinaryDataEncoder::Config &config)
Scan or acquisition from original raw file used to create this peak list, as specified in sourceFile...
std::vector< InstrumentConfigurationPtr > instrumentConfigurationPtrs
list and descriptions of instrument configurations.
The method of precursor ion selection and activation.
ChromatogramListPtr chromatogramListPtr
all chromatograms for this run.
std::vector< BinaryDataArrayPtr > binaryDataArrayPtrs
list of binary data arrays.
SourceFilePtr sourceFilePtr
for precursor spectra that are external to this document, this attribute MUST reference the 'id' attr...
A component of an instrument corresponding to a source (i.e. ion source), an analyzer (i...
SoftwarePtr softwarePtr
reference to a previously defined software element.
std::vector< ChromatogramPtr > chromatograms
boost::shared_ptr< Spectrum > SpectrumPtr
boost::shared_ptr< ChromatogramList > ChromatogramListPtr
boost::shared_ptr< ScanSettings > ScanSettingsPtr
TimeIntensityPair(double time, double intensity)
std::string name
an optional name for the sample description, mostly intended as a quick mnemonic. ...
std::vector< ProcessingMethod > processingMethods
description of the default peak processing method(s). This element describes the base method used in ...
std::vector< Precursor > precursors
list and descriptions of precursors to the spectrum currently being described.
ScanSettingsPtr scanSettingsPtr
reference to a scan settings element defining global scan settings used by this configuration ...
IsolationWindow isolationWindow
this element captures the isolation (or 'selection') window configured to isolate one or more precurs...
boost::shared_ptr< DataProcessing > DataProcessingPtr
SoftwarePtr softwarePtr
this attribute MUST reference the 'id' of the appropriate SoftwareType.
size_t defaultArrayLength
default length of binary data arrays contained in this element.
ComponentType type
the type of component (Source, Analyzer, or Detector)
PWIZ_API_DECL CVID getDefaultNativeIDFormat(const MSData &msd)
returns the nativeID format from the defaultSourceFilePtr if set, or from sourceFilePtrs[0] if the li...
std::string id
an identifier for this file.
std::string name
name of the source file, without reference to location (either URI or local path).
std::string externalSpectrumID
for scans that are external to this document, this string must correspond to the 'id' attribute of a ...
boost::shared_ptr< ChromatogramListSimple > ChromatogramListSimplePtr
virtual ~ChromatogramList()
int order
this attribute MUST be used to indicate the order in which the components are encountered from source...
size_t index
the zero-based, consecutive index of the chromatogram in the ChromatogramList.
FileDescription fileDescription
information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is sto...
std::string id
a unique identifier across the samples with which to reference this sample description.
FileContent fileContent
this summarizes the different types of spectra that can be expected in the file. This is expected to ...
Precursor precursor
description of precursor ion information (i.e. Q1 settings)
std::vector< ScanSettingsPtr > scanSettingsPtrs
list with the descriptions of the acquisition settings applied prior to the start of data acquisition...
float lexical_cast(const std::string &str)
std::string spectrumID
for scans that are local to this document, this attribute can be used to reference the 'id' attribute...
Interface for accessing spectra, which may be stored in memory or backed by a data file (RAW...
std::string id
an optional id for the mzML document. It is recommended to use LSIDs when possible.
std::string id
a unique identifier for this run.
DataProcessingPtr dataProcessingPtr
this optional attribute may reference the 'id' attribute of the appropriate dataProcessing.
SourceFilePtr defaultSourceFilePtr
default source file reference
std::string id
a unique identifier for this spectrum. It should be expected that external files may use this identif...
PWIZ_API_DECL std::map< std::string, std::string > parse(const std::string &id)
parses an id string into a map<string,string>
size_t defaultArrayLength
default length of binary data arrays contained in this element.
std::string location
URI-formatted location where the file was retrieved.
boost::iostreams::stream_offset sourceFilePosition
for file-based MSData implementations, this attribute may refer to the spectrum's position in the fil...
Description of the default peak processing method. This element describes the base method used in the...
Information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is sto...
std::string spectrumID
reference to the id attribute of the spectrum from which the precursor was selected.
int order
this attributes allows a series of consecutive steps to be placed in the correct order.
The data point type of a mass spectrum.
A run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
Simple writeable in-memory implementation of ChromatogramList.
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
std::string accession
an optional accession number for the mzML document.
std::vector< Target > targets
target list (or 'inclusion list') configured prior to the run.
value_type valueAs(const std::string &id, const std::string &name)
templated convenience function to extract a named value from an id string
virtual bool empty() const
returns true iff (size() == 0) and (dataProcessingPtr.get() == NULL)
std::string id
a unique identifier for this data processing that is unique across all DataProcessingTypes.
The base class for elements that may contain cvParams, userParams, or paramGroup references.
Activation activation
the type and energy level used for activation.
bool hasBinaryData() const
returns true iff has nonnull and nonempty BinaryDataArrayPtr
std::string id
a unique identifier for this acquisition setting.
std::vector< ScanWindow > scanWindows
container for a list of select windows.
Product product
description of product ion information (i.e. Q3 settings)
std::string version
the software version.
boost::shared_ptr< SpectrumList > SpectrumListPtr
std::vector< Contact > contacts
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)
PWIZ_API_DECL std::vector< CV > defaultCVList()
virtual size_t size() const
returns the number of chromatograms
size_t index
the zero-based, consecutive index of the spectrum in the SpectrumList.
int countFiltersApplied() const
double mz(double neutralMass, int protonDelta, int electronDelta=0, int neutronDelta=0)
std::vector< CV > cvs
container for one or more controlled vocabulary definitions.
The data point type of a chromatogram.
boost::iostreams::stream_offset sourceFilePosition
for file-based MSData implementations, this attribute may refer to the chromatogram's position in the...
std::string startTimeStamp
the optional start timestamp of the run, in UT.
boost::shared_ptr< MSData > MSDataPtr
InstrumentConfigurationPtr instrumentConfigurationPtr
this attribute MUST reference the 'id' attribute of the appropriate instrument configuration.
List with the different components used in the mass spectrometer. At least one source, one mass analyzer and one detector need to be specified.
std::vector< SourceFilePtr > sourceFilePtrs
container for a list of source file references.
This element captures the isolation (or 'selection') window configured to isolate one or more precurs...
std::string spotID
the identifier for the spot from which this spectrum was derived, if a MALDI or similar run...
std::vector< SamplePtr > samplePtrs
list and descriptions of samples.
std::vector< double > data
the binary data.
Description of a particular hardware configuration of a mass spectrometer. Each configuration MUST ha...
boost::shared_ptr< InstrumentConfiguration > InstrumentConfigurationPtr
std::vector< Scan > scans
The structure into which encoded binary data goes. Byte ordering is always little endian (Intel style...
virtual bool empty() const
std::vector< SelectedIon > selectedIons
this list of precursor ions that were selected.
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
DataProcessingPtr dataProcessingPtr
this attribute can optionally reference the 'id' of the appropriate dataProcessing.
std::vector< ParamGroupPtr > paramGroupPtrs
container for a list of referenceableParamGroups
Identifying information for a spectrum.
std::vector< SpectrumPtr > spectra
std::vector< SoftwarePtr > softwarePtrs
list and descriptions of software used to acquire and/or process the data in this mzML file...
Description of the acquisition settings of the instrument prior to the start of the run...
std::vector< DataProcessingPtr > dataProcessingPtrs
list and descriptions of data processing applied to this data.
std::vector< BinaryDataArrayPtr > binaryDataArrayPtrs
list of binary data arrays.
List and descriptions of scans.
Component(ComponentType type, int order)
PWIZ_API_DECL bool operator==(const TruncatedLorentzianParameters &t, const TruncatedLorentzianParameters &u)
Expansible description of the sample used to generate the dataset, named in sampleName.
std::string externalSpectrumID
for precursor spectra that are external to this document, this string MUST correspond to the 'id' att...
SourceFilePtr sourceFilePtr
this attribute can optionally reference the 'id' of the appropriate sourceFile.
boost::shared_ptr< SpectrumListSimple > SpectrumListSimplePtr
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
MZIntensityPair(double mz, double intensity)
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...
Identifying information for a chromatogram.
Component(CVID cvid, int order)
boost::shared_ptr< Sample > SamplePtr
DataProcessingPtr dataProcessingPtr
this attribute can optionally reference the 'id' of the appropriate dataProcessing.
The structure that captures the generation of a peak list (including the underlying acquisitions) ...
SamplePtr samplePtr
this attribute MUST reference the 'id' of the appropriate sample.
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
std::string id
an identifier for this instrument configuration.
SourceFilePtr sourceFilePtr
if this attribute is set, it must reference the 'id' attribute of a sourceFile representing the exter...
Simple writeable in-memory implementation of SpectrumList.
boost::shared_ptr< Chromatogram > ChromatogramPtr
boost::shared_ptr< BinaryDataArray > BinaryDataArrayPtr
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...
represents a tag-value pair, where the tag comes from the controlled vocabulary
std::string id
an identifier for this software that is unique across all SoftwareTypes.
boost::shared_ptr< SourceFile > SourceFilePtr
Description of the source file, including location and type.
InstrumentConfigurationPtr defaultInstrumentConfigurationPtr
this attribute MUST reference the 'id' of the default instrument configuration. If a scan does not re...