| 244 | } |
| 245 | |
| 246 | ExitCodes main_(int, const char**) override |
| 247 | { |
| 248 | //------------------------------------------------------------- |
| 249 | // parameter handling |
| 250 | //------------------------------------------------------------- |
| 251 | StringList in_spec = getStringList_("in"); |
| 252 | StringList out = getStringList_("out"); |
| 253 | String in_lib = getStringOption_("lib"); |
| 254 | String compare_function = getStringOption_("compare_function"); |
| 255 | |
| 256 | float precursor_mass_tolerance = getDoubleOption_("precursor:mass_tolerance"); |
| 257 | bool precursor_mass_tolerance_unit_ppm = getStringOption_("precursor:mass_tolerance_unit") == "ppm" ? true : false; |
| 258 | |
| 259 | int pc_min_charge = getIntOption_("precursor:min_charge"); |
| 260 | int pc_max_charge = getIntOption_("precursor:max_charge"); |
| 261 | |
| 262 | // consider one before annotated monoisotopic peak and the annotated one |
| 263 | IntList isotopes = getIntList_("precursor:isotopes"); |
| 264 | |
| 265 | // float fragment_mass_tolerance = getDoubleOption_("fragment:mass_tolerance"); |
| 266 | // bool fragment_mass_tolerance_unit_ppm = getStringOption_("fragment:mass_tolerance_unit") == "ppm" ? true : false; |
| 267 | |
| 268 | int top_hits = getIntOption_("report:top_hits"); |
| 269 | |
| 270 | float remove_peaks_below_threshold = getDoubleOption_("filter:remove_peaks_below_threshold"); |
| 271 | UInt min_peaks = getIntOption_("filter:min_peaks"); |
| 272 | UInt max_peaks = getIntOption_("filter:max_peaks"); |
| 273 | Int cut_peaks_below = getIntOption_("filter:cut_peaks_below"); |
| 274 | |
| 275 | StringList fixed_modifications = getStringList_("modifications:fixed"); |
| 276 | StringList variable_modifications = getStringList_("modifications:variable"); |
| 277 | |
| 278 | if (top_hits < -1) |
| 279 | { |
| 280 | writeLogError_("top_hits (should be >= -1 )"); |
| 281 | return ILLEGAL_PARAMETERS; |
| 282 | } |
| 283 | |
| 284 | // ------------------------------------------------------------- |
| 285 | // loading input |
| 286 | // ------------------------------------------------------------- |
| 287 | if (out.size() != in_spec.size()) |
| 288 | { |
| 289 | writeLogError_("out (should be as many as input files)"); |
| 290 | return ILLEGAL_PARAMETERS; |
| 291 | } |
| 292 | |
| 293 | time_t prog_time = time(nullptr); |
| 294 | MSPFile spectral_library; |
| 295 | PeakMap query, library; |
| 296 | |
| 297 | // spectra which will be identified |
| 298 | MzMLFile spectra; |
| 299 | spectra.setLogType(log_type_); |
| 300 | |
| 301 | time_t start_build_time = time(nullptr); |
| 302 | // ------------------------------------------------------------- |
| 303 | // building map for faster search |
nothing calls this directly
no test coverage detected