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

Hilmar Lapp hlapp at gmx.net
Tue Mar 4 16:02:02 UTC 2008


On Mar 4, 2008, at 9:37 AM, Sendu Bala wrote:

> 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! :)

Related to that, will contract_linear_paths() actually do the right  
thing and adjust branch lengths if it removes internal nodes with  
outdegree 1?

Rutger - does Bio::Phylo handle this correctly?

	-hilmar

-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================






More information about the Bioperl-l mailing list