in reply to Re: how to output the final Tree into a file?
in thread how to output the final Tree into a file?
Hmm, I've not used it myself, but the docs seemed pretty clear that the file/filehandle is for reading, and that Bio::TreeIO doesn't have a print method, but relies on you to print the contents of the tree. From the DESCRIPTION:
and the SYNOPSIS:This is the driver module for Tree reading from data streams and flatf +iles. This is intended to be able to create Bio::Tree::TreeI objects.
In this case the OP has created his tree with Bio::TreeIO and it's held in $treeout.{ use Bio::TreeIO; my $treeio = Bio::TreeIO->new(-format => 'newick', -file => 'globin.dnd'); while( my $tree = $treeio->next_tree ) { print "Tree is ", $tree->number_nodes, "\n"; } }
|
|---|