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

Method main_

src/topp/MSFraggerAdapter.cpp:387–914  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385 }
386
387 ExitCodes main_(int, const char**) override
388 {
389 if (getStringOption_(TOPPMSFraggerAdapter::license) != "yes" && !getFlag_("test"))
390 {
391 _fatalError("MSFragger may only be used upon acceptance of license terms.");
392 }
393
394 File::TempDir working_directory(debug_level_ >= 2);
395 try
396 {
397 // java executable
398 this->java_exe = this->getStringOption_(TOPPMSFraggerAdapter::java_executable);
399
400 if (!JavaInfo::canRun(this->java_exe, true))
401 {
402 _fatalError("Java executable cannot be run!");
403 }
404
405 // executable
406 this->exe = this->getStringOption_(TOPPMSFraggerAdapter::executable);
407
408 if (this->exe.empty())
409 {
410 // looks for MSFRAGGER_PATH in the environment
411 QString qmsfragger_path = QProcessEnvironment::systemEnvironment().value("MSFRAGGER_PATH");
412 if (qmsfragger_path.isEmpty())
413 {
414 _fatalError("No executable for MSFragger could be found!");
415 }
416 this->exe = qmsfragger_path;
417 }
418
419 // input, output, database name
420 const String database = this->getStringOption_(TOPPMSFraggerAdapter::database);
421 input_file = (this->getStringOption_(TOPPMSFraggerAdapter::in)).toQString();
422 output_file = this->getStringOption_(TOPPMSFraggerAdapter::out);
423 optional_output_file = this->getStringOption_(TOPPMSFraggerAdapter::opt_out);
424
425 // tolerance
426 const double arg_precursor_mass_tolerance_lower(this->getDoubleOption_(TOPPMSFraggerAdapter::precursor_mass_tolerance_lower));
427 const double arg_precursor_mass_tolerance_upper(this->getDoubleOption_(TOPPMSFraggerAdapter::precursor_mass_tolerance_upper));
428 const String & arg_precursor_mass_unit = this->getStringOption_(TOPPMSFraggerAdapter::precursor_mass_unit);
429 const double arg_precursor_true_tolerance(this->getDoubleOption_(TOPPMSFraggerAdapter::precursor_true_tolerance));
430 const String & arg_precursor_true_unit = this->getStringOption_(TOPPMSFraggerAdapter::precursor_true_unit);
431 const double arg_fragment_mass_tolerance(this->getDoubleOption_(TOPPMSFraggerAdapter::fragment_mass_tolerance));
432 const String & arg_fragment_mass_unit = this->getStringOption_(TOPPMSFraggerAdapter::fragment_mass_unit);
433 const String & arg_isotope_error = this->getStringOption_(TOPPMSFraggerAdapter::isotope_error);
434
435 // digest
436 const String & arg_search_enzyme_name = this->getStringOption_(TOPPMSFraggerAdapter::search_enzyme_name);
437 const String & arg_search_enzyme_cutafter = this->getStringOption_(TOPPMSFraggerAdapter::search_enzyme_cutafter);
438 const String & arg_search_enzyme_nocutbefore = this->getStringOption_(TOPPMSFraggerAdapter::search_enzyme_nocutbefore);
439
440 std::map< String,int > num_enzyme_termini;
441 num_enzyme_termini["non-enzymatic"] = 0;
442 num_enzyme_termini["semi"] = 1;
443 num_enzyme_termini["fully"] = 2;
444 const int arg_num_enzyme_termini = num_enzyme_termini[this->getStringOption_(TOPPMSFraggerAdapter::num_enzyme_termini)];

Callers

nothing calls this directly

Calls 15

_addVarModMethod · 0.95
numberFunction · 0.85
getStringOption_Method · 0.80
getDoubleOption_Method · 0.80
getIntOption_Method · 0.80
getFlag_Method · 0.80
getDoubleList_Method · 0.80
getStringList_Method · 0.80
substrMethod · 0.80
getDiffMonoMassMethod · 0.80
setSearchEngineMethod · 0.80
getParam_Method · 0.80

Tested by

no test coverage detected