MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / writeHeader_

Method writeHeader_

src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp:4093–5030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4091 }
4092
4093 void MzMLHandler::writeHeader_(std::ostream& os,
4094 const MapType& exp,
4095 std::vector<std::vector< ConstDataProcessingPtr > >& dps,
4096 const Internal::MzMLValidator& validator)
4097 {
4098 os << "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";
4099
4100 if (options_.getWriteIndex())
4101 {
4102 os << "<indexedmzML xmlns=\"http://psi.hupo.org/ms/mzml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd\">\n";
4103 }
4104 os << R"(<mzML xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0.xsd" accession=")" << writeXMLEscape(exp.getIdentifier()) << "\" version=\"" << version_ << "\">\n";
4105 //--------------------------------------------------------------------------------------------
4106 // CV list
4107 //--------------------------------------------------------------------------------------------
4108 os << "\t<cvList count=\"5\">\n"
4109 << "\t\t<cv id=\"MS\" fullName=\"Proteomics Standards Initiative Mass Spectrometry Ontology\" URI=\"http://psidev.cvs.sourceforge.net/*checkout*/psidev/psi/psi-ms/mzML/controlledVocabulary/psi-ms.obo\"/>\n"
4110 << "\t\t<cv id=\"UO\" fullName=\"Unit Ontology\" URI=\"http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo\"/>\n"
4111 << "\t\t<cv id=\"BTO\" fullName=\"BrendaTissue545\" version=\"unknown\" URI=\"http://www.brenda-enzymes.info/ontology/tissue/tree/update/update_files/BrendaTissueOBO\"/>\n"
4112 << "\t\t<cv id=\"GO\" fullName=\"Gene Ontology - Slim Versions\" version=\"unknown\" URI=\"http://www.geneontology.org/GO_slims/goslim_goa.obo\"/>\n"
4113 << "\t\t<cv id=\"PATO\" fullName=\"Quality ontology\" version=\"unknown\" URI=\"http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/phenotype/quality.obo\"/>\n"
4114 << "\t</cvList>\n";
4115 //--------------------------------------------------------------------------------------------
4116 // file content
4117 //--------------------------------------------------------------------------------------------
4118 os << "\t<fileDescription>\n";
4119 os << "\t\t<fileContent>\n";
4120 std::map<InstrumentSettings::ScanMode, UInt> file_content;
4121 for (Size i = 0; i < exp.size(); ++i)
4122 {
4123 ++file_content[exp[i].getInstrumentSettings().getScanMode()];
4124 }
4125 if (file_content.find(InstrumentSettings::MASSSPECTRUM) != file_content.end())
4126 {
4127 os << "\t\t\t<cvParam cvRef=\"MS\" accession=\"MS:1000294\" name=\"mass spectrum\" />\n";
4128 }
4129 if (file_content.find(InstrumentSettings::MS1SPECTRUM) != file_content.end())
4130 {
4131 os << "\t\t\t<cvParam cvRef=\"MS\" accession=\"MS:1000579\" name=\"MS1 spectrum\" />\n";
4132 }
4133 if (file_content.find(InstrumentSettings::MSNSPECTRUM) != file_content.end())
4134 {
4135 os << "\t\t\t<cvParam cvRef=\"MS\" accession=\"MS:1000580\" name=\"MSn spectrum\" />\n";
4136 }
4137 if (file_content.find(InstrumentSettings::SIM) != file_content.end())
4138 {
4139 os << "\t\t\t<cvParam cvRef=\"MS\" accession=\"MS:1000582\" name=\"SIM spectrum\" />\n";
4140 }
4141 if (file_content.find(InstrumentSettings::SRM) != file_content.end())
4142 {
4143 os << "\t\t\t<cvParam cvRef=\"MS\" accession=\"MS:1000583\" name=\"SRM spectrum\" />\n";
4144 }
4145 if (file_content.find(InstrumentSettings::CRM) != file_content.end())
4146 {
4147 os << "\t\t\t<cvParam cvRef=\"MS\" accession=\"MS:1000581\" name=\"CRM spectrum\" />\n";
4148 }
4149 if (file_content.find(InstrumentSettings::PRECURSOR) != file_content.end())
4150 {

Callers

nothing calls this directly

Calls 15

cmpPtrContainerFunction · 0.85
getWriteIndexMethod · 0.80
getScanModeMethod · 0.80
getSampleMethod · 0.80
getVolumeMethod · 0.80
getConcentrationMethod · 0.80
getCommentMethod · 0.80
getChromatogramsMethod · 0.80
getIonOpticsMethod · 0.80
getInletTypeMethod · 0.80
getIonizationMethodMethod · 0.80
getAccuracyMethod · 0.80

Tested by

no test coverage detected