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

Jason Stajich jason.stajich at duke.edu
Thu Jun 30 12:19:50 EDT 2005


I guess this is a bug - can you submit it as a bug to bugzilla.open-bio.org so
we can track it.  I thought I unified the slots where newick/nhx/nexus all
get/set bootstraps but perhaps not.

Bootstraps should be in the 'B' tag for nhx but I guess it isn't there?

-jason

-- 
Jason Stajich
jason.stajich at duke.edu
http://www.duke.edu/~jes12/


Quoting rfsouza at cecm.usp.br:

> 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
> ";
> }
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
> 



More information about the Bioperl-l mailing list