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

Method main_

src/topp/IDScoreSwitcher.cpp:67–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66
67 ExitCodes main_(int, const char**) override
68 {
69 switcher_.setParameters(getParam_().copySubset(switcher_.getParameters()));
70 String in = getStringOption_("in"), out = getStringOption_("out");
71 bool do_proteins_ = getFlag_("proteins"); // from full param of IDScoreSwitcherAlgorithm
72
73 vector<ProteinIdentification> proteins;
74 vector<PeptideIdentification> peptides;
75
76 IdXMLFile().load(in, proteins, peptides);
77
78 Size counter = 0;
79 if (do_proteins_)
80 {
81 for (auto& pid : proteins)
82 {
83 switcher_.switchScores<ProteinIdentification>(pid, counter);
84 }
85 }
86 else
87 {
88 for (auto& pepid : peptides)
89 {
90 switcher_.switchScores<PeptideIdentification>(pepid, counter);
91 }
92 }
93
94 IdXMLFile().store(out, proteins, peptides);
95
96 OPENMS_LOG_INFO << "Successfully switched " << counter << " "
97 << (do_proteins_ ? "protein" : "PSM") << " scores." << endl;
98
99 return EXECUTION_OK;
100 }
101
102};
103

Callers

nothing calls this directly

Calls 5

setParametersMethod · 0.80
copySubsetMethod · 0.80
getParametersMethod · 0.45
loadMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected