[Bioperl-l] TreeIO problem with nexus format
jason at cgt.duhs.duke.edu
Tue Aug 3 07:37:48 EDT 2004
write_tree is not supported for the nexus format for the 1.4 version of
You can use newick or you can get the latest version of the nexus.pm
module from CVS which now has the ability to call write_tree.
On Tue, 3 Aug 2004, Csaba Ortutay wrote:
> I am working with phylogenetic trees, and I have the following problem.
> I want to build a tree from scratch, and according to some posts on the list I
> made this code:
> #!/usr/bin/perl -w
> use strict;
> use Bio::TreeIO;
> my $nodeL = new Bio::Tree::Node();
> my $nodeR = new Bio::Tree::Node();
> my $node = new Bio::Tree::Node();
> my $tree = new Bio::Tree::Tree(-root => $node);
> my $treeio = new Bio::TreeIO(-format => 'newick', -file => '>try.tre');
> This is working nicely, but when I try to save the tree in nexus format, I got
> this message:
> ------------- EXCEPTION -------------
> MSG: Cannot call method write_tree on Bio::TreeIO object must use a subclass
> STACK Bio::TreeIO::nexus::write_tree
> STACK toplevel ./makemaintree.pl:25
> I am using bioperl 1.4.
> Do you have any idea, what is wrong?
jason at cgt.mc.duke.edu
More information about the Bioperl-l