bioperl / bioperl-live-redmine

Legacy tickets migrated from the OBF Redmine issue tracker: http://redmine.open-bio.org
0 stars 0 forks source link

Failed to add annotation in Bio::TreeIO for the phyloXML format #141

Open cjfields opened 8 years ago

cjfields commented 8 years ago

Author Name: Sébastien Moretti (Sébastien Moretti) Original Redmine Issue: 3413, https://redmine.open-bio.org/issues/3413 Original Date: 2013-02-14 Original Assignee: Bioperl Guts


Hi

The add_phyloXML_annotation method looks to be broken in Bio::TreeIO for phyloXML trees. Here is the error message I got:

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(0x5911830)’) called at /software/share/perl5/vendor_perl/Bio/TreeIO/phyloxml.pm line 670 Bio::TreeIO::phyloxml::processXMLNode(‘Bio::TreeIO::phyloxml=HASH(0x5911830)’) called at /software/share/perl5/vendor_perl/Bio/TreeIO/phyloxml.pm line 309 Bio::TreeIO::phyloxml::add_phyloXML_annotation(‘Bio::TreeIO::phyloxml=HASH(0x5911830)’, ‘-obj’, ‘Bio::Tree::Tree=HASH(0x592a240)’, ‘-xml’, ‘SUMF familyST006’) called at ./add_annotation_to_phyloxml.pl line 43

And part of my code running on BioPerl 1.6.901 with Perl 5.14.2

use Bio::TreeIO;

my $treeio = new Bio::TreeIO(-file => “$infile”, -format => ‘phyloxml’, ); my $tree = $treeio->next_tree;

  1. Add annotation $treeio->add_phyloXML_annotation(-obj => $tree, -xml => ‘SUMF familyST006’, );

Regards