From 095831cff19579408c606a87de40fd2d82c280fa Mon Sep 17 00:00:00 2001 From: preecej Date: Sat, 14 Jul 2012 00:33:57 +0000 Subject: [PATCH] Fixed curr_ontology_type bug in transform_gaf, correctly switches between ontologies in the same file during XML generation svn path=/; revision=359 --- planteome/paw/paw_TransformForImport.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/planteome/paw/paw_TransformForImport.pl b/planteome/paw/paw_TransformForImport.pl index abef8c5..076dca5 100644 --- a/planteome/paw/paw_TransformForImport.pl +++ b/planteome/paw/paw_TransformForImport.pl @@ -815,6 +815,9 @@ sub transform_gaf ENCODING => 'utf-8' ); + # clear the $curr_ontology_type var + $curr_ontology_type = ""; + # create root elements $writer->xmlDecl; $writer->startTag("Pages"); @@ -885,6 +888,9 @@ sub transform_gaf foreach my $ont_term (keys %{$annotations{$annotation}{"Ontological References"}}) { + # determine current ontology + $curr_ontology_type = (split(':',$ont_term))[0]; + # gather PMID's for separate Ref Publication page creation (avoid dupes) if (scalar keys (%{$annotations{$annotation}{"Ontological References"}{$ont_term}{"Publications"}}) > 0) { foreach my $pub_term (keys %{$annotations{$annotation}{"Ontological References"}{$ont_term}{"Publications"}}) -- 2.34.1