[Bioperl-l] treeio->write_tree problem

Chris Fields cjfields at illinois.edu
Wed Oct 20 14:15:09 EDT 2010


Nice catch!  Completely missed that.

chris

On Oct 20, 2010, at 11:01 AM, Adam Witney wrote:

> 
> 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
> 
> 
> _______________________________________________
> 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