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

Method addPepIDMetaValues_

src/topp/QualityControl.cpp:524–559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522 }
523
524 void addPepIDMetaValues_(
525 const vector<PeptideIdentification>& f_pep_ids,
526 const multimap<String, pair<Size, Size>>& customID_to_cpepID,
527 const map<String, StringList>& fidentifier_to_msrunpath,
528 ConsensusMap& cmap) const
529 {
530 for (const PeptideIdentification& f_pep_id : f_pep_ids)
531 {
532 // for empty PIs which were created by a metric
533 if (f_pep_id.getHits().empty())
534 {
535 continue;
536 }
537 String UID = PeptideIdentification::buildUIDFromPepID(f_pep_id,fidentifier_to_msrunpath);
538 const auto range = customID_to_cpepID.equal_range(UID);
539
540 for (auto it_pep = range.first; it_pep != range.second; ++it_pep) // OMS_CODING_TEST_EXCLUDE
541 {
542 // copy all MetaValues that are at PepID level
543 // copy all MetaValues that are at best Hit level
544 //TODO check if first = best assumption is met!
545 Size cf_index = it_pep->second.first; //ConsensusFeature Index
546 Size pi_index = it_pep->second.second; //PeptideIdentification Index
547 if (cf_index != Size(-1))
548 {
549 cmap[cf_index].getPeptideIdentifications()[pi_index].addMetaValues(f_pep_id);
550 cmap[cf_index].getPeptideIdentifications()[pi_index].getHits()[0].addMetaValues(f_pep_id.getHits()[0]);
551 }
552 else
553 {
554 cmap.getUnassignedPeptideIdentifications()[pi_index].addMetaValues(f_pep_id);
555 cmap.getUnassignedPeptideIdentifications()[pi_index].getHits()[0].addMetaValues(f_pep_id.getHits()[0]);
556 }
557 }
558 }
559 }
560
561 void indexFasta(std::vector<FASTAFile::FASTAEntry>& prot_description, std::map<String, String>& fasta_map)
562 {

Callers

nothing calls this directly

Calls 2

addMetaValuesMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected