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

Method getProteinGroups_

src/openms/source/FORMAT/IdXMLFile.cpp:945–970  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

943 }
944
945 void IdXMLFile::getProteinGroups_(std::vector<ProteinIdentification::ProteinGroup>&
946 groups, const String& group_name)
947 {
948 groups.clear();
949 Size g_id = 0;
950 String current_meta = group_name + "_" + String(g_id);
951 StringList values;
952 while (last_meta_->metaValueExists(current_meta)) // assumes groups have incremental g_IDs
953 {
954 // convert to proper ProteinGroup
955 ProteinIdentification::ProteinGroup g;
956 String(last_meta_->getMetaValue(current_meta)).split(',', values);
957 if (values.size() < 2)
958 {
959 fatalError(LOAD, String("Invalid UserParam for ProteinGroups (not enough values)'"));
960 }
961 g.probability = values[0].toDouble();
962 for (Size i_ind = 1; i_ind < values.size(); ++i_ind)
963 {
964 g.accessions.push_back(proteinid_to_accession_[values[i_ind]]);
965 }
966 groups.push_back(std::move(g));
967 last_meta_->removeMetaValue(current_meta);
968 current_meta = group_name + "_" + String(++g_id);
969 }
970 }
971
972 std::ostream& IdXMLFile::createFlankingAAXMLString_(const std::vector<PeptideEvidence> & pes, std::ostream& os)
973 {

Callers

nothing calls this directly

Calls 9

metaValueExistsMethod · 0.80
getMetaValueMethod · 0.80
toDoubleMethod · 0.80
StringClass · 0.50
clearMethod · 0.45
splitMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
removeMetaValueMethod · 0.45

Tested by

no test coverage detected