| 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 | { |
nothing calls this directly
no test coverage detected