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

Method nextProteinSectionRowFromProteinGroup_

src/openms/source/FORMAT/MzTab.cpp:1494–1530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1492 }
1493
1494 MzTabProteinSectionRow MzTab::nextProteinSectionRowFromProteinGroup_(
1495 const ProteinIdentification::ProteinGroup& group,
1496 const MzTabString& db,
1497 const MzTabString& db_version)
1498 {
1499 MzTabProteinSectionRow protein_row;
1500 protein_row.database = db; // Name of the protein database.
1501 protein_row.database_version = db_version; // String Version of the protein database.
1502
1503 MzTabStringList ambiguity_members;
1504 ambiguity_members.setSeparator(',');
1505 vector<MzTabString> entries;
1506 for (Size j = 0; j != group.accessions.size() ; ++j)
1507 {
1508 // set accession and description to first element of group
1509 if (j == 0)
1510 {
1511 protein_row.accession = MzTabString(group.accessions[j]);
1512 // protein_row.description // TODO: how to set description? information not contained in group
1513 }
1514 entries.emplace_back(group.accessions[j]);
1515 }
1516 ambiguity_members.set(entries);
1517 protein_row.ambiguity_members = ambiguity_members; // Alternative protein identifications.
1518 protein_row.best_search_engine_score[1] = MzTabDouble(group.probability);
1519
1520 protein_row.coverage = MzTabDouble();
1521
1522 MzTabOptionalColumnEntry opt_column_entry;
1523 opt_column_entry.first = "opt_global_result_type";
1524 opt_column_entry.second = MzTabString("general_protein_group");
1525 protein_row.opt_.push_back(opt_column_entry);
1526
1527 remapTargetDecoyProteinSection_(protein_row.opt_);
1528
1529 return protein_row;
1530 }
1531
1532 MzTabProteinSectionRow MzTab::nextProteinSectionRowFromIndistinguishableGroup_(
1533 const std::vector<ProteinHit>& protein_hits,

Callers

nothing calls this directly

Calls 6

setSeparatorMethod · 0.80
emplace_backMethod · 0.80
sizeMethod · 0.45
setMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected