Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: =?ISO-8859-1?Q?Moretti_S=E9bastien?= <sebastien.moretti <at> unil.ch>
Subject: PhyloXML
Newsgroups: gmane.comp.lang.perl.bio.general
Date: Friday 8th February 2013 16:19:29 UTC (over 3 years ago)
Hi

I would like to add some XML to an existing PhyloXML tree.

No problem to read and write it.
I would like to add smthg after the  tag as in 
http://www.phyloxml.org/examples_syntax/phyloxml_syntax_example_1.html
but get problems with add_phyloXML_annotation() :

Can't locate object method "annotation" via package "Bio::Tree::Tree" at
         /software/share/perl5/vendor_perl/Bio/TreeIO/phyloxml.pm line 
984,  line 1 (#1)
     (F) You called a method correctly, and it correctly indicated a
package
     functioning as a class, but that package doesn't define that
particular
     method, nor does any of its base classes.  See perlobj.

Uncaught exception from user code:
         Can't locate object method "annotation" via package 
"Bio::Tree::Tree" at 
/software/share/perl5/vendor_perl/Bio/TreeIO/phyloxml.pm line 984, 
 line 1.
  at /software/share/perl5/vendor_perl/Bio/TreeIO/phyloxml.pm line 984
 
Bio::TreeIO::phyloxml::element_default('Bio::TreeIO::phyloxml=HASH(0x134b1268)')

called at /software/share/perl5/vendor_perl/Bio/TreeIO/phyloxml.pm line 670
 
Bio::TreeIO::phyloxml::processXMLNode('Bio::TreeIO::phyloxml=HASH(0x134b1268)')

called at /software/share/perl5/vendor_perl/Bio/TreeIO/phyloxml.pm line 309
 
Bio::TreeIO::phyloxml::add_phyloXML_annotation('Bio::TreeIO::phyloxml=HASH(0x134b1268)',

'-obj', 'Bio::Tree::Tree=HASH(0x13525258)', '-xml', 'SUMF 
family') called at ./add_annotation_to_phyloxml.pl line 40


I think I do something wrong but what ?
Here is the code

my $treeio = new Bio::TreeIO(-file   => "$infile",
                              -format => 'phyloxml',
                             );
my $tree = $treeio->next_tree;

# Add annotation
$treeio->add_phyloXML_annotation(-obj => $tree,
                                  -xml => 'SUMF family',
                                 );

-- 
S├ębastien Moretti
 
CD: 11ms