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

Method exportIdentificationsToMzTab

src/openms/source/FORMAT/MzTab.cpp:2305–2340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2303 }
2304
2305 MzTab MzTab::exportIdentificationsToMzTab(
2306 const vector<ProteinIdentification>& prot_ids,
2307 const vector<PeptideIdentification>& peptide_ids,
2308 const String& filename,
2309 bool first_run_inference_only,
2310 bool export_empty_pep_ids,
2311 bool export_all_psms,
2312 const String& title)
2313 {
2314 vector<const PeptideIdentification*> pep_ids_ptr;
2315 pep_ids_ptr.reserve(peptide_ids.size());
2316 for (const PeptideIdentification& pi : peptide_ids) { pep_ids_ptr.push_back(&pi); }
2317
2318 vector<const ProteinIdentification*> prot_ids_ptr;
2319 prot_ids_ptr.reserve(prot_ids.size());
2320 for (const ProteinIdentification& pi : prot_ids) { prot_ids_ptr.push_back(&pi); }
2321
2322 IDMzTabStream s(prot_ids_ptr, pep_ids_ptr, filename, first_run_inference_only, export_empty_pep_ids, export_all_psms, title);
2323
2324 MzTab m;
2325 m.setMetaData(s.getMetaData());
2326
2327 MzTabProteinSectionRow prot_row;
2328 while (s.nextPRTRow(prot_row))
2329 {
2330 m.getProteinSectionRows().emplace_back(std::move(prot_row));
2331 }
2332
2333 MzTabPSMSectionRow psm_row;
2334 while (s.nextPSMRow(psm_row))
2335 {
2336 m.getPSMSectionRows().emplace_back(std::move(psm_row));
2337 }
2338
2339 return m;
2340 }
2341
2342 MzTabModificationList MzTab::extractModificationList(const PeptideHit& pep_hit, const vector<String>& fixed_mods, const vector<String>& localization_mods)
2343 {

Callers

nothing calls this directly

Calls 7

nextPRTRowMethod · 0.80
emplace_backMethod · 0.80
nextPSMRowMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
setMetaDataMethod · 0.45

Tested by

no test coverage detected