Hi,
I have a random tree where I need to show only the interesting parts.
Each node in the tree contain a feature called feat
, it only contains a value for some leafs.
What I want to do is:
Draw the tree, and only keep the parts where at least one leaf contain a value in this feature, i.e. collapse all the internal nodes where there are no leafs containing a value inside the feature feat
.
I tried to use the collapsing functions used in the ETE2 documentation, but they don't seem to work well and they produce a non-complete newick tree which is not readable by the ete2 module (or maybe I did something wrong).
Can someone tell me how to do that?