Go to the source code of this file.
◆ initializeTinyMGF()
void initializeTinyMGF |
( |
MSData & |
msd | ) |
|
Definition at line 40 of file Serializer_MGF_Test.cpp.
56 Spectrum& s20 = *spectrumList->spectra[0];
88 for (
int i=0; i<10; i++)
91 for (
int i=0; i<10; i++)
97 Spectrum& s21 = *spectrumList->spectra[1];
130 for (
int i=1; i<=10; i++)
133 for (
int i=0; i<10; i++)
References pwiz::msdata::Spectrum::defaultArrayLength, pwiz::msdata::FileDescription::fileContent, pwiz::msdata::MSData::fileDescription, pwiz::msdata::Spectrum::getIntensityArray(), pwiz::msdata::Spectrum::getMZArray(), pwiz::msdata::SpectrumIdentity::id, pwiz::msdata::SpectrumIdentity::index, MS_base_peak_intensity, MS_base_peak_m_z, MS_centroid_spectrum, MS_charge_state, MS_highest_observed_m_z, MS_lowest_observed_m_z, MS_m_z, MS_ms_level, MS_MSn_spectrum, MS_negative_scan, MS_no_combination, MS_number_of_detector_counts, MS_peak_intensity, MS_positive_scan, MS_possible_charge_state, MS_scan_start_time, MS_selected_ion_m_z, MS_spectrum_title, MS_total_ion_current, pwiz::msdata::Spectrum::precursors, pwiz::util::BinaryData< T >::push_back(), pwiz::msdata::MSData::run, pwiz::msdata::Spectrum::scanList, pwiz::msdata::ScanList::scans, pwiz::msdata::Precursor::selectedIons, pwiz::data::ParamContainer::set(), pwiz::msdata::Spectrum::setMZIntensityArrays(), pwiz::util::BinaryData< T >::size(), pwiz::msdata::Run::spectrumListPtr, and UO_second.
Referenced by testWriteRead().
◆ testWriteRead() [1/2]
void testWriteRead |
( |
const MSData & |
msd | ) |
|
Definition at line 141 of file Serializer_MGF_Test.cpp.
146 serializer.
write(oss, msd);
148 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
150 shared_ptr<istringstream> iss(
new istringstream(oss.str()));
152 serializer.
read(iss, msd2);
References diff(), pwiz::msdata::DiffConfig::ignoreChromatograms, pwiz::msdata::DiffConfig::ignoreIdentity, os_, pwiz::msdata::Serializer_MGF::read(), unit_assert, pwiz::identdata::IO::write(), pwiz::msdata::Serializer_MGF::write(), and pwiz::msdata::Serializer_mzML::write().
Referenced by main(), and testWriteRead().
◆ testWriteRead() [2/2]
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ os_
BinaryDataArrayPtr getIntensityArray() const
get intensity array (may be null)
MS_charge_state
charge state: The charge state of the ion, single or multiple and positive or negatively charged.
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...
The structure that captures the generation of a peak list (including the underlying acquisitions)
size_t index
the zero-based, consecutive index of the spectrum in the SpectrumList.
MS_base_peak_m_z
base peak m/z: M/z value of the signal of highest intensity in the mass spectrum.
MS_scan_start_time
scan start time: The time that an analyzer started a scan, relative to the start of the MS run.
MS_MSn_spectrum
MSn spectrum: MSn refers to multi-stage MS2 experiments designed to record product ion spectra where ...
MSData <-> mzML stream serialization.
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)
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
MS_total_ion_current
total ion current: The sum of all the separate ion currents carried by the ions of different m/z cont...
MS_negative_scan
negative scan: Polarity of the scan is negative.
MS_positive_scan
positive scan: Polarity of the scan is positive.
UO_second
second: A time unit which is equal to the duration of 9 192 631 770 periods of the radiation correspo...
MSData <-> MGF stream serialization.
BinaryDataArrayPtr getMZArray() const
get m/z array (may be null)
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,...
PWIZ_API_DECL void write(minimxml::XMLWriter &writer, const CV &cv)
Calculate diffs of objects in a ProteoWizard data model hierarchy.
std::string id
a unique identifier for this spectrum. It should be expected that external files may use this identif...
void testWriteRead(const MSData &msd)
FileContent fileContent
this summarizes the different types of spectra that can be expected in the file. This is expected to ...
FileDescription fileDescription
information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is sto...
void push_back(const T &value)
MS_no_combination
no combination: Use this term if only one scan was recorded or there is no information about scans av...
void diff(const string &filename1, const string &filename2)
void initializeTinyMGF(MSData &msd)
boost::shared_ptr< Spectrum > SpectrumPtr
MS_selected_ion_m_z
selected ion m/z: Mass-to-charge ratio of an selected ion.
Simple writeable in-memory implementation of SpectrumList.
ScanList scanList
list of scans
Scan or acquisition from original raw file used to create this peak list, as specified in sourceFile.
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here....
std::vector< Scan > scans
This summarizes the different types of spectra that can be expected in the file. This is expected to ...
#define TEST_PROLOG(argc, argv)
MS_ms_level
ms level: Stages of ms achieved in a multi stage mass spectrometry experiment.
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
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_centroid_spectrum
centroid spectrum: Processing of profile data to produce spectra that contains discrete peaks of zero...
MS_peak_intensity
peak intensity: Intensity of ions as measured by the height or area of a peak in a mass spectrum.
MS_highest_observed_m_z
highest observed m/z: Highest m/z value observed in the m/z array.
MS_base_peak_intensity
base peak intensity: The intensity of the greatest peak in the mass spectrum.
std::vector< Precursor > precursors
list and descriptions of precursors to the spectrum currently being described.
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
configuration struct for diffing MSData types
std::vector< SelectedIon > selectedIons
this list of precursor ions that were selected.
void write(std::ostream &os, const MSData &msd, const pwiz::util::IterationListenerRegistry *iterationListenerRegistry=0) const
write MSData object to ostream as MGF; 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.
The method of precursor ion selection and activation.
size_t defaultArrayLength
default length of binary data arrays contained in this element.
MS_possible_charge_state
possible charge state: A possible charge state of the ion in a situation where the charge of an ion i...
bool ignoreIdentity
ignore members of SpectrumIdentity and ChromatogramIdentity
represents a tag-value pair, where the tag comes from the controlled vocabulary
void write(std::ostream &os, const MSData &msd, const pwiz::util::IterationListenerRegistry *iterationListenerRegistry=0) const
write MSData object to ostream as mzML; iterationListenerRegistry may be used to receive progress upd...
MS_spectrum_title
spectrum title: A free-form text title describing a spectrum.