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

Method endElement

src/openms/source/FORMAT/IdXMLFile.cpp:828–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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_ = &param_;
854 }
855 else if (tag == "VariableModification")
856 {
857 last_meta_ = &param_;
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_));

Callers

nothing calls this directly

Calls 12

metaValueExistsMethod · 0.80
getMetaValueMethod · 0.80
emplace_backMethod · 0.80
setPeptideEvidencesMethod · 0.80
addAnalysisResultsMethod · 0.80
convertMethod · 0.45
push_backMethod · 0.45
emptyMethod · 0.45
insertHitMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected