[Bioperl-l] HOWTO:Trees module

Sendu Bala bix at sendu.me.uk
Wed Mar 12 23:20:01 UTC 2008


Victoria Lyn Uhlhorn wrote:
> my $treeout = Bio::TreeIO->new(-format => 'newick');

> 	$treeout->write_tree($tree);

> How do I print the tree?  I'm having a hard time printing the tree out.

Your TreeIO will write its trees to the file or filehandle you give it. 
But you haven't given it one. Give it one are write_tree() will then 
cause the tree to be 'printed' there.

If you want the trees stored in a string so you can print() them, there 
are ways to open a filehandle onto a scalar variable.



More information about the Bioperl-l mailing list