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

Method parseParameters_

src/topp/LuciphorAdapter.cpp:174–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172 }
173
174 ExitCodes parseParameters_(map<String, vector<String> >& config_map, const String& id, const String& in,
175 const String& out, const vector<String>& target_mods, String selection_method)
176 {
177 FileHandler fh;
178
179 config_map["SPECTRUM_PATH"].push_back(File::path(File::absolutePath(in)));
180 config_map["SPECTRUM_SUFFIX"].push_back(FileTypes::typeToName(fh.getTypeByFileName(in)));
181 config_map["INPUT_DATA"].push_back(id);
182
183 String type = FileTypes::typeToName(fh.getTypeByFileName(id));
184 config_map["INPUT_TYPE"].push_back(0);
185
186 config_map["ALGORITHM"].push_back(ListUtils::getIndex<String>(fragment_methods_, getStringOption_("fragment_method")));
187 config_map["MS2_TOL"].push_back(getDoubleOption_("fragment_mass_tolerance"));
188 config_map["MS2_TOL_UNITS"].push_back(ListUtils::getIndex<String>(fragment_error_units_, getStringOption_("fragment_error_units")));
189 config_map["MIN_MZ"].push_back(getDoubleOption_("min_mz"));
190 config_map["OUTPUT_FILE"].push_back(out);
191 config_map["DECOY_MASS"].push_back(getDoubleOption_("decoy_mass"));
192 config_map["MAX_CHARGE_STATE"].push_back(getIntOption_("max_charge_state"));
193 config_map["MAX_PEP_LEN"].push_back(getIntOption_("max_peptide_length"));
194 config_map["MAX_NUM_PERM"].push_back(getIntOption_("max_num_perm"));
195 config_map["SELECTION_METHOD"].push_back(ListUtils::getIndex<String>(score_selection_method_, selection_method));
196 config_map["MODELING_SCORE_THRESHOLD"].push_back(getDoubleOption_("modeling_score_threshold"));
197 config_map["SCORING_THRESHOLD"].push_back(getDoubleOption_("scoring_threshold"));
198 config_map["MIN_NUM_PSMS_MODEL"].push_back(getIntOption_("min_num_psms_model"));
199 config_map["NUM_THREADS"].push_back(getIntOption_("num_threads"));
200 config_map["RUN_MODE"].push_back(getStringOption_("run_mode"));
201
202 for (vector<String>::const_iterator it = target_mods.begin(); it != target_mods.end(); ++it)
203 {
204 config_map["TARGET_MOD"].push_back(makeModString_(*it));
205 }
206
207 vector<String> neutral_losses = getStringList_("neutral_losses");
208 for (vector<String>::const_iterator it = neutral_losses.begin(); it != neutral_losses.end(); ++it)
209 {
210 config_map["NL"].push_back(*it);
211 }
212
213 vector<String> dcy_neutral_losses = getStringList_("decoy_neutral_losses");
214 for (vector<String>::const_iterator it = dcy_neutral_losses.begin(); it != dcy_neutral_losses.end(); ++it)
215 {
216 config_map["DECOY_NL"].push_back(*it);
217 }
218
219 return EXECUTION_OK;
220 }
221
222 void writeConfigurationFile_(const String& out_path, map<String, vector<String> >& config_map)
223 {

Callers

nothing calls this directly

Calls 4

getTypeByFileNameMethod · 0.80
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected