Go to the documentation of this file.
43 if (
os_) *
os_ <<
"test(): indexed=\"" << boolalpha << indexed <<
"\"\n";
53 serializer.
write(oss, tiny);
55 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
57 shared_ptr<istream> is(
new istringstream(oss.str()));
94 IndexList indexList = sl->findNameValue(
"scan",
"19");
95 unit_assert(indexList.size()==1 && indexList[0]==0);
97 indexList = sl->findNameValue(
"scan",
"20");
98 unit_assert(indexList.size()==1 && indexList[0]==1);
100 indexList = sl->findNameValue(
"scan",
"21");
101 unit_assert(indexList.size()==1 && indexList[0]==2);
106 unit_assert(sl->spectrumIdentity(0).id ==
"scan=19");
107 unit_assert(sl->spectrumIdentity(0).sourceFilePosition != -1);
118 Scan& scan = s->scanList.scans[0];
126 unit_assert(s->binaryDataArrayPtrs[0]->data.empty() && s->binaryDataArrayPtrs[1]->data.empty());
128 s = sl->spectrum(0,
true);
131 unit_assert(!s->binaryDataArrayPtrs[0]->data.empty() && !s->binaryDataArrayPtrs[1]->data.empty());
133 vector<MZIntensityPair> pairs;
134 s->getMZIntensityPairs(pairs);
138 *
os_ <<
"scan 19:\n";
139 copy(pairs.begin(), pairs.end(), ostream_iterator<MZIntensityPair>(*
os_,
"\n"));
144 for (
int i=0; i<15; i++)
147 Scan& scan19 = s->scanList.scans[0];
152 instrumentConfiguration.
userParams[0].name ==
"doobie");
157 unit_assert(sl->spectrumIdentity(1).id ==
"scan=20");
159 s = sl->spectrum(1,
true);
181 s->getMZIntensityPairs(pairs);
185 *
os_ <<
"scan 20:\n";
186 copy(pairs.begin(), pairs.end(), ostream_iterator<MZIntensityPair>(*
os_,
"\n"));
191 for (
int i=0; i<10; i++)
192 unit_assert(pairs[i].
mz==2*i && pairs[i].intensity==(10-i)*2);
198 unit_assert(sl->spectrumIdentity(2).id ==
"scan=21");
200 s = sl->spectrum(2,
false);
203 UserParam exampleUserParam = s->userParam(
"example");
212 unit_assert(sl->spectrumIdentity(3).id ==
"scan=22");
214 s = sl->spectrum(3,
false);
218 Precursor& precursor22 = s->precursors[0];
239 int main(
int argc,
char* argv[])
245 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
Uncontrolled user parameters (essentially allowing free text). Before using these,...
MS_LCQ_Deca
LCQ Deca: ThermoFinnigan LCQ Deca.
std::string type
the datatype of the parameter, where appropriate (e.g.: xsd:float).
boost::shared_ptr< SpectrumList > SpectrumListPtr
MS_Bruker_Agilent_YEP_format
Bruker/Agilent YEP format: Bruker/Agilent YEP file format.
void write(std::ostream &os, const MSData &msd, const pwiz::util::IterationListenerRegistry *iterationListenerRegistry=0) const
write MSData object to ostream as mzXML; iterationListenerRegistry may be used to receive progress up...
MS_charge_state
charge state: The charge state of the ion, single or multiple and positive or negatively charged.
std::vector< SoftwarePtr > softwarePtrs
list and descriptions of software used to acquire and/or process the data in this mzML file.
MS_m_z_array
m/z array: A data array of m/z values.
int main(int argc, char *argv[])
Description of the default peak processing method. This element describes the base method used in the...
Description of the source file, including location and type.
MS_ProteoWizard_software
ProteoWizard software: ProteoWizard software for data processing and analysis. Primarily developed by...
std::vector< UserParam > userParams
a collection of uncontrolled user terms
MS_ETD
ETD (electron transfer dissociation): A process to fragment ions in a mass spectrometer by inducing f...
MS_scan_start_time
scan start time: The time that an analyzer started a scan, relative to the start of the MS run.
InstrumentConfigurationPtr instrumentConfigurationPtr
this attribute MUST reference the 'id' attribute of the appropriate instrument configuration.
std::vector< SourceFilePtr > sourceFilePtrs
list and descriptions of the source files this mzML document was generated or derived from.
MS_Conversion_to_mzML
Conversion to mzML: Conversion of a file format to Proteomics Standards Initiative mzML file format.
MS_positive_scan
positive scan: Polarity of the scan is positive.
std::string spectrumID
reference to the id attribute of the spectrum from which the precursor was selected.
PWIZ_API_DECL void write(minimxml::XMLWriter &writer, const CV &cv)
bool indexed
(indexed==true): read/write with <index>
MS_Bruker_Agilent_YEP_nativeID_format
Bruker/Agilent YEP nativeID format: Native format defined by scan=xsd:nonNegativeInteger.
MS_collision_energy
collision energy: Energy for an ion experiencing collision with a stationary gas particle resulting i...
FileDescription fileDescription
information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is sto...
bool hasCVParam(CVID cvid) const
returns true iff cvParams contains exact cvid (recursive)
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
std::string value
the value for the parameter, where appropriate.
boost::shared_ptr< Spectrum > SpectrumPtr
Activation activation
the type and energy level used for activation.
MS_intensity_array
intensity array: A data array of intensity values.
MS_selected_ion_m_z
selected ion m/z: Mass-to-charge ratio of an selected ion.
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.
MSData <-> mzXML stream serialization.
#define TEST_PROLOG(argc, argv)
boost::shared_ptr< DataProcessing > DataProcessingPtr
MS_ms_level
ms level: Stages of ms achieved in a multi stage mass spectrometry experiment.
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.
bool empty() const
returns true iff name, value, type, and units are all empty
MS_peak_intensity
peak intensity: Intensity of ions as measured by the height or area of a peak in a mass spectrum.
Serializer_mzXML configuration.
std::vector< InstrumentConfigurationPtr > instrumentConfigurationPtrs
list and descriptions of instrument configurations.
MS_base_peak_intensity
base peak intensity: The intensity of the greatest peak in the mass spectrum.
Description of a particular hardware configuration of a mass spectrometer. Each configuration MUST ha...
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.
std::vector< SelectedIon > selectedIons
this list of precursor ions that were selected.
boost::shared_ptr< InstrumentConfiguration > InstrumentConfigurationPtr
The method of precursor ion selection and activation.
MS_CID
CID (collision-induced dissociation): The dissociation of an ion after collisional excitation....
std::string name
the name for the parameter.
boost::shared_ptr< Software > SoftwarePtr
std::vector< CVParam > cvParams
a collection of controlled vocabulary terms