| 736 | } |
| 737 | |
| 738 | ExitCodes main_(int, const char**) override |
| 739 | { |
| 740 | String in = getStringOption_("in"); |
| 741 | String out = getStringOption_("out"); |
| 742 | String peptide_out = getStringOption_("peptide_out"); |
| 743 | String mztab = getStringOption_("mztab"); |
| 744 | String design_file = getStringOption_("design"); |
| 745 | bool greedy_group_resolution = getStringOption_("greedy_group_resolution") == "true"; |
| 746 | |
| 747 | if (out.empty() && peptide_out.empty()) |
| 748 | { |
| 749 | throw Exception::RequiredParameterNotGiven(__FILE__, __LINE__, |
| 750 | OPENMS_PRETTY_FUNCTION, |
| 751 | "out/peptide_out"); |
| 752 | } |
| 753 | |
| 754 | String protein_groups = getStringOption_("protein_groups"); |
| 755 | if (!protein_groups.empty()) // read protein inference data |
| 756 | { |
| 757 | vector<ProteinIdentification> proteins; |
| 758 | IdXMLFile().load(protein_groups, proteins, peptides_); |
| 759 | if (proteins.empty() || |
| 760 | proteins[0].getIndistinguishableProteins().empty()) |
| 761 | { |
| 762 | throw Exception::MissingInformation( |
| 763 | __FILE__, |
| 764 | __LINE__, |
| 765 | OPENMS_PRETTY_FUNCTION, |
| 766 | "No information on indistinguishable protein groups found in file '" + protein_groups + "'"); |
| 767 | } |
| 768 | proteins_ = proteins[0]; // inference data is attached to first ID run |
| 769 | if (greedy_group_resolution) |
| 770 | { |
| 771 | PeptideProteinResolution ppr{}; |
| 772 | ppr.buildGraph(proteins_, peptides_); |
| 773 | ppr.resolveGraph(proteins_, peptides_); |
| 774 | } |
| 775 | } |
| 776 | |
| 777 | FileTypes::Type in_type = FileHandler::getType(in); |
| 778 | |
| 779 | PeptideAndProteinQuant quantifier; |
| 780 | algo_params_ = quantifier.getParameters(); |
| 781 | Logger::LogStream nirvana; // avoid parameter update messages |
| 782 | algo_params_.update(getParam_(), false, nirvana); |
| 783 | // algo_params_.update(getParam_()); |
| 784 | quantifier.setParameters(algo_params_); |
| 785 | |
| 786 | // iBAQ works only with feature intensity values in consensusXML or featureXML files |
| 787 | if (algo_params_.getValue("method") == "iBAQ" && in.hasSuffix("idXML")) |
| 788 | { |
| 789 | throw Exception::InvalidParameter(__FILE__, __LINE__, |
| 790 | OPENMS_PRETTY_FUNCTION, |
| 791 | "Invalid input: idXML for iBAQ, only consensusXML or featureXML are valid"); |
| 792 | } |
| 793 | |
| 794 | // iBAQ can only quantify proteins |
| 795 | if (algo_params_.getValue("method") == "iBAQ" && !peptide_out.empty()) |
nothing calls this directly
no test coverage detected