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

Method reindex_

src/openms/source/APPLICATIONS/SearchEngineBase.cpp:96–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94 }
95
96 SearchEngineBase::ExitCodes SearchEngineBase::reindex_(std::vector<ProteinIdentification>& protein_identifications,
97 std::vector<PeptideIdentification>& peptide_identifications) const
98 {
99 if (getStringOption_("reindex") == "true")
100 {
101 PeptideIndexing indexer;
102
103 // extract parameter subtree
104 Param param = getParam_().copy("PeptideIndexing:", true);
105
106 Param param_pi = indexer.getParameters();
107 // copy search engine specific default parameter for peptide indexing into param_pi
108 param_pi.update(param, false, false, false, false, OpenMS_Log_debug); // suppress param. update message
109 indexer.setParameters(param_pi);
110 indexer.setLogType(this->log_type_);
111 FASTAContainer<TFI_File> proteins(getDBFilename());
112 PeptideIndexing::ExitCodes indexer_exit = indexer.run(proteins, protein_identifications, peptide_identifications);
113
114 if ((indexer_exit != PeptideIndexing::EXECUTION_OK) &&
115 (indexer_exit != PeptideIndexing::PEPTIDE_IDS_EMPTY))
116 {
117 if (indexer_exit == PeptideIndexing::DATABASE_EMPTY)
118 {
119 return INPUT_FILE_EMPTY;
120 }
121 else if (indexer_exit == PeptideIndexing::UNEXPECTED_RESULT)
122 {
123 return UNEXPECTED_RESULT;
124 }
125 else
126 {
127 return UNKNOWN_ERROR;
128 }
129 }
130 }
131 return EXECUTION_OK;
132 }
133
134 void SearchEngineBase::registerPeptideIndexingParameter_(Param peptide_indexing_parameter)
135 {

Callers

nothing calls this directly

Calls 6

setParametersMethod · 0.80
setLogTypeMethod · 0.80
copyMethod · 0.45
getParametersMethod · 0.45
updateMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected