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

Method main_

src/topp/SimpleSearchEngine.cpp:91–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89 }
90
91 ExitCodes main_(int, const char**) override
92 {
93 String in = getStringOption_("in");
94 String database = getStringOption_("database");
95 String out = getStringOption_("out");
96
97 ProgressLogger progresslogger;
98 progresslogger.setLogType(log_type_);
99
100 vector<ProteinIdentification> protein_ids;
101 vector<PeptideIdentification> peptide_ids;
102
103 SimpleSearchEngineAlgorithm sse;
104 sse.setParameters(getParam_().copy("Search:", true));
105 //TODO ??? Why not use the TOPPBase ExitCodes?
106 // same for OpenPepXL etc. Otherwise please write a proper mapping.
107 SimpleSearchEngineAlgorithm::ExitCodes e = sse.search(in, database, protein_ids, peptide_ids);
108 if (e != SimpleSearchEngineAlgorithm::ExitCodes::EXECUTION_OK)
109 {
110 return TOPPBase::ExitCodes::INTERNAL_ERROR;
111 }
112
113 // MS path already set in algorithm. Overwrite here so we get something testable
114 if (getFlag_("test"))
115 {
116 // if test mode set, add file without path so we can compare it
117 protein_ids[0].setPrimaryMSRunPath({"file://" + File::basename(in)});
118 }
119
120 IdXMLFile().store(out, protein_ids, peptide_ids);
121
122 return EXECUTION_OK;
123 }
124
125};
126

Callers

nothing calls this directly

Calls 6

setLogTypeMethod · 0.80
setParametersMethod · 0.80
searchMethod · 0.80
copyMethod · 0.45
setPrimaryMSRunPathMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected