[Bioperl-l] treeio->write_tree problem
Adam Witney
awitney at sgul.ac.uk
Wed Oct 20 16:01:45 UTC 2010
you are writing to your input stream. I think you need to create a separate output stream. Maybe something like this (untested):
my $treeio = new Bio::TreeIO(-file => "PF03466_seed.nhx.txt",
-format => "newick");
my $treeio_out = new Bio::TreeIO(-fh => \*STDOUT,
-format => "newick");
while( my $tree = $treeio->next_tree ) {
$treeio_out->write_tree($tree);
print Dumper($tree);
}
On 20 Oct 2010, at 16:27, Jim Hu wrote:
> Help! In the script below, I'm not getting any output from treeio->write_tree. Dumper shows that the tree is populated.
>
> Jim
>
> use Data::Dumper;
> use Bio::TreeIO;
> my $treeio = new Bio::TreeIO(-file => "PF03466_seed.nhx.txt",
> -format => "newick");
> while( my $tree = $treeio->next_tree ) {
> $treeio->write_tree($tree);
> print Dumper($tree);
>
> }
>
> =====================================
> Jim Hu
> Associate Professor
> Dept. of Biochemistry and Biophysics
> 2128 TAMU
> Texas A&M Univ.
> College Station, TX 77843-2128
> 979-862-4054
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list