Rooting phylogenetic trees
0
0
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

t.resolve_polytomy(recursive=True)


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:

(S1_k119_1138_344_724_+:0.22774,(S1_k119_1782_32486_32866_-:0.04188,S1_k119_1547_11916_12296_-:0.07101)1.000:0.25419,(S1_k119_4028_659546_659923_-:0.23907,S2_k119_3147_162168_162545_+:0.32681)1.000:0.20719);


and

 (S1_k119_1258_3537_4883_+:0.24246,(S1_k119_4102_548_1942_+:0.18944,S1_k119_2149_40529_41893_+:0.12723)1.000:0.24475,(S2_k119_3441_424920_426194_+:0.64101,S2_k119_1062_424_1815_+:0.43592)0.999:0.16514);


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
0
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.

0
Entering edit mode

is there a python version for this package also?