From: preecej Date: Sat, 14 Jul 2012 00:33:57 +0000 (+0000) Subject: Fixed curr_ontology_type bug in transform_gaf, correctly switches X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=095831cff19579408c606a87de40fd2d82c280fa;p=old-jaiswallab-svn%2F.git Fixed curr_ontology_type bug in transform_gaf, correctly switches between ontologies in the same file during XML generation svn path=/; revision=359 --- 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"}})