#!/usr/bin/perl -w


use lib "/var/www/bioinformatics.cs.uri.edu/htdocs/gene-vis/template/bioperl-1.5.2_101/Devel-StackTrace-1.13/lib";
use lib "/var/www/bioinformatics.cs.uri.edu/htdocs/gene-vis/template/bioperl-1.5.2_101/Exception-Class-1.23/lib";
use lib "/var/www/bioinformatics.cs.uri.edu/htdocs/gene-vis/template/bioperl-1.5.2_101/Bio-Phylo-0.15/lib";
use lib "/var/www/bioinformatics.cs.uri.edu/htdocs/gene-vis/template/bioperl-1.5.2_101/Class-Data-Inheritable-0.06/lib";


use Bio::TreeIO;
use strict;
my ($filein,$fileout) = @ARGV;
my ($format,$oformat) = qw(newick nexus);
my $in = Bio::TreeIO->new(-file => $filein, -format => $format);
my $out= Bio::TreeIO->new(-format => $oformat, -file => ">$fileout");

while( my $t = $in->next_tree ) {
     $out->write_tree($t);
 }
exit 0;
