| 826 | } |
| 827 | |
| 828 | void IdXMLFile::endElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname) |
| 829 | { |
| 830 | String tag = sm_.convert(qname); |
| 831 | |
| 832 | // START |
| 833 | if (tag == "IdXML") |
| 834 | { |
| 835 | prot_id_in_run_ = false; |
| 836 | } |
| 837 | // SEARCH PARAMETERS |
| 838 | else if (tag == "SearchParameters") |
| 839 | { |
| 840 | if (last_meta_->metaValueExists("EnzymeTermSpecificity")) |
| 841 | { |
| 842 | String spec = last_meta_->getMetaValue("EnzymeTermSpecificity"); |
| 843 | if (spec != "unknown") |
| 844 | { |
| 845 | param_.enzyme_term_specificity = static_cast<EnzymaticDigestion::Specificity>(EnzymaticDigestion::getSpecificityByName(spec)); |
| 846 | } |
| 847 | } |
| 848 | last_meta_ = nullptr; |
| 849 | parameters_[id_] = param_; |
| 850 | } |
| 851 | else if (tag == "FixedModification") |
| 852 | { |
| 853 | last_meta_ = ¶m_; |
| 854 | } |
| 855 | else if (tag == "VariableModification") |
| 856 | { |
| 857 | last_meta_ = ¶m_; |
| 858 | } |
| 859 | // PROTEIN IDENTIFICATIONS |
| 860 | else if (tag == "ProteinIdentification") |
| 861 | { |
| 862 | // post processing of ProteinGroups (hack) |
| 863 | getProteinGroups_(prot_id_.getProteinGroups(), "protein_group"); |
| 864 | getProteinGroups_(prot_id_.getIndistinguishableProteins(), |
| 865 | "indistinguishable_proteins"); |
| 866 | |
| 867 | prot_ids_->push_back(prot_id_); |
| 868 | prot_id_ = ProteinIdentification(); |
| 869 | last_meta_ = nullptr; |
| 870 | prot_id_in_run_ = true; |
| 871 | } |
| 872 | else if (tag == "IdentificationRun") |
| 873 | { |
| 874 | if (prot_ids_->empty()) |
| 875 | { |
| 876 | // add empty <ProteinIdentification> if there was none so far (that's where the IdentificationRun parameters are stored) |
| 877 | prot_ids_->emplace_back(std::move(prot_id_)); |
| 878 | } |
| 879 | prot_id_ = ProteinIdentification(); |
| 880 | last_meta_ = nullptr; |
| 881 | prot_id_in_run_ = false; |
| 882 | } |
| 883 | else if (tag == "ProteinHit") |
| 884 | { |
| 885 | prot_id_.insertHit(std::move(prot_hit_)); |
nothing calls this directly
no test coverage detected