5 tree2pag - convert Bio::TreeIO parseable format trees to pagel format
9 tree2pag -if nexus -i file.nexus > file.pag
11 # OR pipe in through STDIN, and use newick format instead
13 cat file.newick | tree2pag -if newick > file.nh
15 # OR specify an output and input
17 tree2pag -o file.pag -i file.newick
21 Convert TreeIO parseable files into Pagel format tree files. Be
22 warned that pagel format only really supports a single tree per file
23 so. Also Pagel parsing is not yet available in bioperl.
30 my ($iformat,$oformat) = ('newick', 'pag');
31 my ($outfile,$infile);
33 'if|informat:s' => \$iformat,
34 'of|outformat:s' => \$oformat,
36 'o|out:s' => \$outfile,
37 'h|help' => sub { exec('perldoc', $0);
42 $in = Bio::TreeIO->new(-format => $iformat,
45 $in = Bio::TreeIO->new(-format => $iformat,
51 $out = Bio::TreeIO->new(-format => $oformat,
52 -file => ">$outfile");
54 $out = Bio::TreeIO->new(-format => $oformat); #print to STDOUT instead
57 while( my $t = $in->next_tree ) {