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