[Bioperl-l] branch length score - total length of the spanning subtree

Sendu Bala bix at sendu.me.uk
Tue Mar 4 09:37:53 EST 2008


Daniel Gerlach wrote:
> Hello,
> 
> I would like to use bioperl to calculate a branch length score for a 
> given set of nodes and a tree. I know how to get the total branch length 
> by using $tree->total_branch_length, but how could I get the length of 
> the subtree spanning some given nodes which are dispersed over the whole 
> tree (a subset of nodes from the tree which are not monophyletic)?

One 'cheat' way of doing it might be to use splice(-keep_ids => 
\@node_ids) or similar, then run total_branch_length() on that. No idea 
if it will actually give you the right answer though. Let us know! :)


More information about the Bioperl-l mailing list