[Biopython] Bio.Phylo: midpoint root?

Tanya Golubchik golubchi at stats.ox.ac.uk
Thu May 31 12:10:21 UTC 2012


Thanks, Eric - will have a go!

T

On 31/05/12 05:36, Eric Talevich wrote:
> On Wed, May 30, 2012 at 10:55 AM, Eric Talevich <eric.talevich at gmail.com
> <mailto:eric.talevich at gmail.com>> wrote:
> 
>     On Wed, May 30, 2012 at 9:40 AM, Tanya Golubchik
>     <golubchi at stats.ox.ac.uk <mailto:golubchi at stats.ox.ac.uk>> wrote:
> 
>         Hello,
> 
>         Does anyone have a quickie method for calculating the midpoint
>         root of a
>         given tree?
> 
> 
>     It's been on my to-do list. (The first step was adding the keyword
>     argument 'outgroup_branch_length' to root_with_outgroup.) The tree
>     method 'depths' should also be handy.
> 
>     The algorithm I had in mind looks like:
> 
> <madness>
> 
> 
>     I too would be delighted to see a better algorithm for this.
> 
> 
> I implemented this in an intuitive but very inefficient way, calculating
> the pairwise distances between all tips of the tree. You can try it from
> git:
> https://github.com/biopython/biopython/commit/94c128bd428cc5d53b50edd1d2e4730ee212f530
> 
> It would still be nice to see a better algorithm, if anyone has one on hand.
> 
> -E



More information about the Biopython mailing list