[Bioperl-l] Find distances between LCA's and the other nodes from a tree

Rutger Vos R.A.Vos at reading.ac.uk
Wed Oct 5 00:42:08 UTC 2011


You should probably pre-compute the distances from each node to all
its ancestors (post-order traversal) and attach those values as hashes
to the internal nodes. Then, for any assigned node, you just traverse
from it to the root, look up those hashes along the way and compute
the distance from the assigned node to all others that way.

2011/10/5 Ross KK Leung <ross at cuhk.edu.hk>:
> -----Original Message-----
> From: rutgeraldo at gmail.com [mailto:rutgeraldo at gmail.com] On Behalf Of Rutger
> Vos
> Sent: 2011年10月5日 8:00
> To: Ross KK Leung
> Cc: Thomas Sharpton; bioperl-l
> Subject: Re: [Bioperl-l] Find distances between LCA's and the other nodes
> from a tree
>
>> I shall infer the state based on descendant's states. In my example, Nodes
> H
>> and I belong to "Wing", then their ancestor M is also assigned "Wing".
> After
>> assigning these states to all the nodes of the tree, I shall calculate the
>> distances between these nodes.
>
> What is your approach for when internal states are equivocal?
>
> I will assign "undetermined" and the detailed plan of assignment is too much
> to mention here.
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



-- 
Dr. Rutger A. Vos
School of Biological Sciences
Philip Lyle Building, Level 4
University of Reading
Reading, RG6 6BX, United Kingdom
Tel: +44 (0) 118 378 7535
http://rutgervos.blogspot.com




More information about the Bioperl-l mailing list