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

Method main_

src/topp/ProteinResolver.cpp:487–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485 }
486
487 ExitCodes main_(int, const char**) override
488 {
489 //-------------------------------------------------------------
490 // parsing parameters
491 //-------------------------------------------------------------
492 String fastafile_name = getStringOption_("fasta");
493 StringList input_list = getStringList_("in");
494 String input_path = getStringOption_("in_path");
495
496 String design = getStringOption_("design");
497 String output_pep_table = getStringOption_("peptide_table");
498 String ouput_prot_groups = getStringOption_("protein_groups");
499 String output_prot_table = getStringOption_("protein_table");
500 String output_stats = getStringOption_("additional_info");
501
502 //-------------------------------------------------------------
503 // check input parameters
504 //-------------------------------------------------------------
505 if (input_list.empty() && input_path.empty())
506 {
507 throw Exception::InvalidParameter(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
508 "All input options are empty.");
509 }
510
511 //-------------------------------------------------------------
512 // check output parameters
513 //-------------------------------------------------------------
514 if (output_pep_table.empty() && ouput_prot_groups.empty() && output_prot_table.empty())
515 {
516 throw Exception::InvalidParameter(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
517 "All output options are empty.");
518 }
519
520 //-------------------------------------------------------------
521 // read fasta file
522 //-------------------------------------------------------------
523 FASTAFile file;
524 std::vector<FASTAFile::FASTAEntry> protein_data;
525 file.load(fastafile_name, protein_data);
526
527 //-------------------------------------------------------------
528 // set up protein resolver ( parameters )
529 //-------------------------------------------------------------
530 ProteinResolver resolver;
531 resolver_params_ = resolver.getParameters();
532 Logger::LogStream nirvana; // avoid parameter update messages
533 resolver_params_.update(getParam_(), false, nirvana);
534 resolver.setParameters(resolver_params_);
535 resolver.setProteinData(protein_data);
536
537 //-------------------------------------------------------------
538 // initialize rest
539 //-------------------------------------------------------------
540 IdXMLFile idXML_file;
541 ConsensusXMLFile consensusXML_file;
542 ConsensusMap consensus;
543 vector<ProteinIdentification> protein_identifications;
544 vector<PeptideIdentification> peptide_identifications;

Callers

nothing calls this directly

Calls 15

getTypeFunction · 0.85
setParametersMethod · 0.80
setProteinDataMethod · 0.80
atMethod · 0.80
applyDesign2ResolverMethod · 0.80
resolveIDMethod · 0.80
resolveConsensusMethod · 0.80
StringClass · 0.50
emptyMethod · 0.45
loadMethod · 0.45
getParametersMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected