I think you need to create the $treeout object with -file first so that it uses it as the stream for the write_tree method
pojmy $outfile = 'C:\Users\AnyUser\Desktop\outree.tre'; my $treeout = Bio::TreeIO->new( -format => 'newick', -file => ">$outfile" ); while( my $aln = $alnio->next_aln ) { my $mat = $stats->distance(-method => 'Kimura', -align => $aln); my $tree = $dfactory->make_tree($mat); $treeout->write_tree($tree); } exit;
In reply to Re^9: how to output the final Tree into a file?
by poj
in thread how to output the final Tree into a file?
by dimitris852
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |