[Bioperl-l] single NHX treefile from two phylip files

Jason Stajich jason.stajich at duke.edu
Fri Apr 8 15:51:02 EDT 2005

I'm assuming they have the same topology.  You just need to figure out 
how to match internal nodes up between the trees.

I do this with the get_lca() method.
Walk up one tree (with distances) and find the internal nodes (those 
which aren't leaves) and then get all the tips beneath it (grep { 
$_->is_Leaf} $node->get_all_Descendents). Then find the LCA for these 
nodes in the OTHER tree.   now you have found the same internal node in 
the other tree, get the bootstrap accordingly and copy to the first 

I'll get around to adding these advanced examples to the howto at some 


Jason Stajich
jason.stajich at duke.edu

On Apr 8, 2005, at 2:24 AM, W.Kenworthy wrote:

> Hi, I am trying to create a single NHX treefile from two phylip files
> (one distance and one with bootstrap values) to view with ATV.  Is 
> there
> anything in BioPerl that would help?  My initial look at the tree
> modules doesn't look promising.
> How do others add BS values to their graphics (is there another/better
> way)? I am aware that there are some questions on the validity of doing
> this, but it is useful none the less.  Now that I am working with 
> larger
> trees more often, hand editing NH files into a combination NHX is
> becoming a pain!
> BillK
> -- 
> William Kenworthy
>   Centre for Bioinformatics and Biological Computing (CBBC)
>   Dept. of Information Technology
>   Division of Arts
>   Murdoch University
>     W.Kenworthy at murdoch.edu.au
>     +61 (0)8 9360 6856
>     Mob: 0419 929 646
> _______________________________________________
> 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