Incorrect length of branches in picture

6 views
Skip to first unread message

Ника Ватолкина

unread,
Apr 7, 2025, 3:22:03 AMApr 7
to eteto...@googlegroups.com
Greetings!

My name is Nicka and I encountered some issue using ete3 (3.1.3)

I visualize my tree in NHX format and somehow longer branches appear smaller on the picture than they should be. For example, 0.96 > 0.122+0.31+0.233, but EPI_ISL_292299 is on the left side in comparison to EPI_ISL_289877.
Also EPI_ISL_289877 and EPI_ISL_291397 are on one level despite having different branch lengths.
image.png

NHX file contains accurate data (same as numbers on the picture) so the problem must occur when I draw the tree.

In my code I iterate through the tree, use node.add_face() function on some nodes, and change some colors with
style = NodeStyle()
style["hz_line_color"] = color
style["vt_line_color"] = color
node.set_style(style)

and then do
ts = TreeStyle()
ts.show_leaf_name = True
pruned_tree.show(tree_style=ts)

please tell what do I do wrong and how I can get a beautiful tree with ete3

--
Hope you answer,
Nicka Vatolkina
Reply all
Reply to author
Forward
0 new messages