5 bp_tree2pag - convert Bio::TreeIO parseable format trees to pagel format
9 bp_tree2pag -if nexus -i file.nexus > file.pag
11 # OR pipe in through STDIN, and use newick format instead
13 cat file.newick | bp_tree2pag -if newick > file.nh
15 # OR specify an output and input
17 bp_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.
31 my ($iformat,$oformat) = ('newick', 'pag');
32 my ($outfile,$infile);
34 'if|informat:s' => \
$iformat,
35 'of|outformat:s' => \
$oformat,
37 'o|out:s' => \
$outfile,
38 'h|help' => sub { exec('perldoc', $0);
43 $in = Bio
::TreeIO
->new(-format
=> $iformat,
46 $in = Bio
::TreeIO
->new(-format
=> $iformat,
52 $out = Bio
::TreeIO
->new(-format
=> $oformat,
53 -file
=> ">$outfile");
55 $out = Bio
::TreeIO
->new(-format
=> $oformat); #print to STDOUT instead
58 while( my $t = $in->next_tree ) {