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

Method writeTo

src/openms/source/FORMAT/HANDLERS/MzIdentMLHandler.cpp:358–942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356 }
357
358 void MzIdentMLHandler::writeTo(std::ostream& os)
359 {
360 String cv_ns = cv_.name();
361 String inputs_element;
362 std::map<String,String> /* peps, pepevis, */ sil_map, sil_2_date;
363 std::set<String> sen_set, sof_set, sip_set;
364 std::map<String, String> sdb_ids, sen_ids, sof_ids, sdat_ids, pep_ids;
365 //std::map<String, String> pep_pairs_ppxl;
366 std::map<String, double> pp_identifier_2_thresh;
367 //std::vector< std::pair<String, String> > pepid_pairs_ppxl;
368
369 // file type-specific definitions needed for SpectraData element:
370 std::map<FileTypes::Type, std::pair<String, String> > formats_map;
371 formats_map[FileTypes::MZML] = make_pair("mzML format", "mzML unique identifier");
372 formats_map[FileTypes::MZXML] = make_pair("ISB mzXML format", "scan number only nativeID format");
373 formats_map[FileTypes::MZDATA] = make_pair("PSI mzData format", "spectrum identifier nativeID format");
374 formats_map[FileTypes::MGF] = make_pair("Mascot MGF format", "multiple peak list nativeID format");
375
376
377 //TODO if constructed with a msexperiment - not yet implemented
378 //~ if(ms_exp_ == 0)
379 //~ {
380 //~ synthesize spectrum references
381 //~ }
382 //~ else
383 //~ {
384 //~ extract peptide and proteinid from msexperiment
385 //~ genereate spectrum references from msexperiment foreach peptideidentification
386 //~ }
387
388 /*---------------------------------------------------------------------
389 DataCollection:
390 +Inputs
391 -AnalysisData collected in sidlist --> unclosed element string
392 ---------------------------------------------------------------------*/
393 inputs_element += String("\t<Inputs>\n");
394 String spectra_data, search_database;
395
396 /*
397 1st: iterate over proteinidentification vector
398 */
399 //TODO read type of crosslink reagent from settings
400 bool is_ppxl = false;
401 for (std::vector<ProteinIdentification>::const_iterator it = cpro_id_->begin(); it != cpro_id_->end(); ++it)
402 {
403 //~ collect analysissoftware in this loop - does not go into inputelement
404 String sof_id;
405 String sof_name = String(it->getSearchEngine());
406 std::map<String, String>::iterator soit = sof_ids.find(sof_name);
407 String osecv;
408 if (sof_name == "OMSSA")
409 {
410 osecv = "OMSSA";
411 }
412 else if (sof_name == "Mascot")
413 {
414 osecv = "Mascot";
415 }

Callers

nothing calls this directly

Calls 15

getUniqueIdFunction · 0.85
hasTermWithNameMethod · 0.80
metaValueExistsMethod · 0.80
getMetaValueMethod · 0.80
inferFromPeptidesMethod · 0.80
getModificationNamesMethod · 0.80
getDateMethod · 0.80
getAccessionMethod · 0.80
getSequenceMethod · 0.80
frontMethod · 0.80
toDoubleMethod · 0.80
substrMethod · 0.80

Tested by

no test coverage detected