Part 2: [Bioperl-l] TreeIO question/problem
Simon K. Chan
skchan at cs.usask.ca
Wed Mar 10 01:05:03 EST 2004
My apologies, but there was a mistake in my first email. My code is actually
the following:
use lib '/home/skchan/bioperl/bioperl-1.4';
use Bio::Tree::Node;
use Bio::TreeIO;
use Bio::Tree::Tree;
use Bio::Tree::TreeI;
# obtained code from bioperl documentation:
my $treeio = new Bio::TreeIO(-format=>"newick", -file=>"./newick_tree");
my $tree = $treeio->next_tree;
print "tree: $tree\n";
$treeio->next_tree does not return anything, thus, I cannot run get_nodes.
Many thanks again.
Simon
----- Forwarded message from "Simon K. Chan" <skchan at cs.usask.ca> -----
Date: Tue, 09 Mar 2004 23:56:24 -0600
From: "Simon K. Chan" <skchan at cs.usask.ca>
Reply-To: "Simon K. Chan" <skchan at cs.usask.ca>
Subject: [Bioperl-l] TreeIO question/problem
To: bioperl-l at bioperl.org
Hi,
I wish to parse a tree in newick format.
I attempted to use the TreeIO module to do so:
My problem is that $treeio->next_tree does not return anything, thus I cannot
call the get_nodes method to get all the nodes in my tree.
My code follows. Many thanks for your time.
use lib '/home/skchan/bioperl/bioperl-1.4';
use Bio::Tree::Node;
use Bio::TreeIO;
use Bio::Tree::Tree;
use Bio::Tree::TreeI;
# obtained code from bioperl documentation:
my $treeio = new Bio::TreeIO(-format=>"newick", -file=>"./newick_tree");
my $tree = $treeio->next_tree;
print "tree: $tree\n";
my @nodes = $treeIO->get_nodes;
print "nodes: @nodes\n";
_______________________________________________
Bioperl-l mailing list
Bioperl-l at portal.open-bio.org
http://portal.open-bio.org/mailman/listinfo/bioperl-l
----- End forwarded message -----
More information about the Bioperl-l
mailing list