[Bioperl-l] nhx.pm does not print bootstrap values

rfsouza at cecm.usp.br rfsouza at cecm.usp.br
Tue Jun 28 19:02:00 EDT 2005


Hi,

I been trying to reformat some phylogenies built by the Phyml program to
the nhx format, in order to print them through ATV, but, for some reason,
the nhx.pm module doesn't print the bootstrap values.

Those values are loaded using newick.pm and get printed out through
nexus.pm, but nhx.pm seems to loose them. I'm using bioperl-live from
CVS (downloaded 20050523). Is this a known bug?

Thanks for any help.
Robson


#--------------
Here is my code:

#!/usr/bin/perl -w

use Bio::TreeIO;
use Getopt::Long;
use strict;

my $usage = 0;
my $outfile = undef;
my $infmt = 'newick';
my $outfmt = 'nhx';
my $bootstyle = '';
GetOptions("infmt|i=s" => \$infmt,
	   "outfmt|o=s" => \$outfmt,
	   "bootstyle|b=s" => \$bootstyle,
	   "outfile|f=s" => \$outfile,
	   "usage|help|h" => \$usage)
    || die "Error parsing command line arguments";
usage() if ($usage || scalar(@ARGV) == 0);

# Storing input file command line arguments
my %inargs = ('-file'=>$ARGV[0], '-format'=>$infmt);
$inargs{'-bootstrap_style'} = $bootstyle if (defined $bootstyle);

# Storing input file command line arguments
my %outargs = ('-format'=>$outfmt);
if (defined $outfile) {
    $outargs{'-file'} = ">$outfile";
} else {
    $outargs{'-fh'} = \*STDOUT;
}

# Building data streams
my $in  = Bio::TreeIO->new(%inargs);
my $out = Bio::TreeIO->new(%outargs);
while (my $t = $in->next_tree) {
    $out->write_tree($t);
}

exit 0;

sub usage {
    die "Usage: $0 [options] <file1> <file2>...
Available options:
 --infmt|-i    <string> : input file format (default: newick)
 --outfmt|-o   <string> : output file format (default: nhx)
 --bootstyle|b <string> : input bootstrap values format
 --outfile|-f  <file>   : output file name (default: stdout)
 --usage|--help|-h      : print this message
";
}




More information about the Bioperl-l mailing list