Rooting phylogenetic trees
Entering edit mode
2.8 years ago
Moses ▴ 120

Hi all,

I'm working on a problem where it requires me to have rooted phylogenetics trees such that the tree at any node is strictly bifurcating. I am using FastTree to generate an initial tree. The way FastTree outputs the tree is that the top most node is trifurcating.

I tried many ways to reroot this tree. one was using the midpoint of the two furthest nodes and to insert the root as that midpoint. another was introducing an artificial outgroup by puting a very different (random) sequences in the multiple sequence allignment. a third way I tried was using the


function provided by ete3. However all these three methods are altering my three topology which I do not want. By tree topology in this case I mean the order in which the leaves appear to be grouped in the initial unrooted tree outputted by FastTree. I do not want to alter that order. I know biologically it is the same when you move those branches internally however for my application I should just respect that order and keep it the same. For example let's say we have these two unrooted trees outputted by FastTree:






As you can see viewing these trees using archaeopteryx tree visulization, then the order for the leaves (top to bottom) for the first tree is: S1_k119_1138_344_724_+ => S1_k119_1782_32486_32866_- => S1_k119_1547_11916_12296_- => S1_k119_4028_659546_659923_- => S2_k119_3147_162168_162545_+

and similarly for the second tree is:

S1_k119_1258_3537_4883_+ => S1_k119_4102_548_1942_+ => S1_k119_2149_40529_41893_+ => S2_k119_3441_424920_426194_+ => S2_k119_1062_424_1815_+

My question/[problem is that I want to root these trees in a way that those groupings (the order that I mentioned above) do not change. I also do not care about the branch lengths I can treat them as they are equal all along if that helps with this purpose, after I obtain the initial unrooted tree from FastTree and deciding on those groupings (order of the leaves) i can ignore branch lengths. Any help would really be appreciated. Thanks for your times.

phylogenetics Python3 Tree Rooting • 1.3k views
Entering edit mode

Not sure if that would work but you could try the reorder.dendrogram() function: save the original order in a vector, manipulate your tree then reorder according to the original order.

Entering edit mode

is there a python version for this package also?


Login before adding your answer.

Traffic: 1669 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6