27 #include "boost/iostreams/positioning.hpp" 54 Spectrum& s20 = *spectrumList->spectra[0];
73 vector<double>& s20_mz = s20.
getMZArray()->data;
76 for (
int i=0; i<10; i++)
77 s20_mz.push_back(i*2);
79 for (
int i=0; i<10; i++)
80 s20_intensity.push_back((10-i)*2);
101 Spectrum& s20 = *spectrumList->spectra[0];
127 vector<double>& s20_mz = s20.
getMZArray()->data;
130 for (
int i=0; i<10; i++)
131 s20_mz.push_back(i*2);
133 for (
int i=0; i<10; i++)
134 s20_intensity.push_back((10-i)*2);
146 serializer.
write(oss, msd);
148 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
151 shared_ptr<istream> iss(
new istringstream(oss.str()));
152 serializer.
read(iss, msd2);
158 if (
os_ && diff) *
os_ << diff << endl;
167 serializer.
write(oss, msd);
169 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
172 shared_ptr<istream> iss(
new istringstream(oss.str()));
173 serializer.
read(iss, msd2);
179 if (
os_ && diff) *
os_ << diff << endl;
188 serializer.
write(oss, msd);
190 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
193 shared_ptr<istream> iss(
new istringstream(oss.str()));
194 serializer.
read(iss, msd2);
200 if (
os_ && diff) *
os_ << diff << endl;
209 serializer.
write(oss, msd);
211 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
214 shared_ptr<istream> iss(
new istringstream(oss.str()));
215 serializer.
read(iss, msd2);
220 if (
os_ && diff) *
os_ << diff << endl;
229 serializer.
write(oss, msd);
231 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
234 shared_ptr<istream> iss(
new istringstream(oss.str()));
235 serializer.
read(iss, msd2);
241 if (
os_ && diff) *
os_ << diff << endl;
250 serializer.
write(oss, msd);
252 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
255 shared_ptr<istream> iss(
new istringstream(oss.str()));
256 serializer.
read(iss, msd2);
262 if (
os_ && diff) *
os_ << diff << endl;
282 int main(
int argc,
char* argv[])
288 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
This summarizes the different types of spectra that can be expected in the file. This is expected to ...
MS_MSn_spectrum
MSn spectrum: MSn refers to multi-stage MS2 experiments designed to record product ion spectra where ...
std::vector< SourceFilePtr > sourceFilePtrs
list and descriptions of the source files this mzML document was generated or derived from...
ScanList scanList
list of scans
MS_base_peak_intensity
base peak intensity: The intensity of the greatest peak in the mass spectrum.
Description of the source file, including location and type.
Scan or acquisition from original raw file used to create this peak list, as specified in sourceFile...
The method of precursor ion selection and activation.
MS_highest_observed_m_z
highest observed m/z: Highest m/z value observed in the m/z array.
MS_MS2_format
MS2 format: MS2 file format for MS2 spectral data.
bool ignoreMetadata
ignore all file level metadata, and most scan level metadata, i.e.
boost::shared_ptr< Spectrum > SpectrumPtr
MS_total_ion_current
total ion current: The sum of all the separate ion currents carried by the ions of different m/z cont...
void read(boost::shared_ptr< std::istream > is, MSData &msd) const
read in MSData object from an MGF istream note: istream may be managed by MSData's SpectrumList...
bool ignoreDataProcessing
MS_scan_start_time
scan start time: The time that an analyzer started a scan, relative to the start of the MS run...
Calculate diffs of objects in a ProteoWizard data model hierarchy.
std::vector< Precursor > precursors
list and descriptions of precursors to the spectrum currently being described.
IsolationWindow isolationWindow
this element captures the isolation (or 'selection') window configured to isolate one or more precurs...
FileDescription fileDescription
information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is sto...
void initializeTinyMS2(MSData &msd)
FileContent fileContent
this summarizes the different types of spectra that can be expected in the file. This is expected to ...
void testWriteReadBMS1(const MSData &msd)
MS_ms_level
ms level: Stages of ms achieved in a multi stage mass spectrometry experiment.
UO_second
second: A time unit which is equal to the duration of 9 192 631 770 periods of the radiation correspo...
MS_selected_ion_m_z
selected ion m/z: Mass-to-charge ratio of an selected ion.
void diff(const string &filename1, const string &filename2)
std::string id
a unique identifier for this spectrum. It should be expected that external files may use this identif...
int main(int argc, char *argv[])
size_t defaultArrayLength
default length of binary data arrays contained in this element.
void testWriteReadMS1(const MSData &msd)
MS_m_z
m/z: Three-character symbol m/z is used to denote the quantity formed by dividing the mass of an ion ...
MS_base_peak_m_z
base peak m/z: M/z value of the signal of highest intensity in the mass spectrum. ...
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
void initializeTinyMS1(MSData &msd)
MSData <-> MSn stream serialization.
size_t index
the zero-based, consecutive index of the spectrum in the SpectrumList.
MS_isolation_window_target_m_z
isolation window target m/z: The primary or reference m/z about which the isolation window is defined...
BinaryDataArrayPtr getIntensityArray() const
get intensity array (may be null)
void testWriteReadBMS2(const MSData &msd)
configuration struct for diffing MSData types
void testWriteReadMS2(const MSData &msd)
MS_possible_charge_state
possible charge state: A possible charge state of the ion in a situation where the charge of an ion i...
std::vector< Scan > scans
void testWriteReadCMS2(const MSData &msd)
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.
MS_scan_number_only_nativeID_format
scan number only nativeID format: Native format defined by scan=xsd:nonNegativeInteger.
MS_number_of_detector_counts
number of detector counts: The number of counted events observed in one or a group of elements of a d...
BinaryDataArrayPtr getMZArray() const
get m/z array (may be null)
MS_centroid_spectrum
centroid spectrum: Processing of profile data to produce spectra that contains discrete peaks of zero...
void setMZIntensityArrays(const std::vector< double > &mzArray, const std::vector< double > &intensityArray, CVID intensityUnits)
set m/z and intensity arrays separately (they must be the same size)
void testWriteReadCMS1(const MSData &msd)
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
#define TEST_PROLOG(argc, argv)
The structure that captures the generation of a peak list (including the underlying acquisitions) ...
void write(std::ostream &os, const MSData &msd, const pwiz::util::IterationListenerRegistry *iterationListenerRegistry=0) const
write MSData object to ostream as MSn; iterationListenerRegistry may be used to receive progress upda...
MS_lowest_observed_m_z
lowest observed m/z: Lowest m/z value observed in the m/z array.
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Simple writeable in-memory implementation of SpectrumList.
boost::shared_ptr< SourceFile > SourceFilePtr
Description of the source file, including location and type.