Question: ETE3 TreeError: 'Nodes are not connected!': how to fix?
gravatar for Macspider
13 months ago by
Vienna - BOKU
Macspider3.0k wrote:

Hi everyone,

I am working with ETE3 and I stumbled upon an error that I have never retrieved before:

ete3.coretype.tree.TreeError: 'Nodes are not connected!'

The error seems to trace back to the get_common_ancestor() function, which is in the script of ETE3.

The lines raising the error are these, within a prune() command:

IDs_to_keep = [ ID for ID in Relevant_ID_list ]
Leaves_to_keep = [ t.search_nodes(name=leaf)[0] for leaf in IDs_to_keep ]

I should probably also mention that not every phylogenetic tree arises this behavior. It is running smoothly for most of the phylogenetic trees in the list I have, and only rarely encountering this error! The internet is quite scarse on the subject and I don't really know what's going on. Can anyone help me?

ADD COMMENTlink modified 13 months ago • written 13 months ago by Macspider3.0k

Is your tree file malformed in some way?

ADD REPLYlink written 13 months ago by Joe16k

Not that I know of. All these trees worked in all my analyses, it would be very unexpected.

ADD REPLYlink written 13 months ago by Macspider3.0k

That is pretty weird. I’ve certainly never seen it before. Perhaps this is one to submit to their issue tracker.

Could you share an example problematic tree and your versions of python/ETE etc to see if others can reproduce?

ADD REPLYlink modified 13 months ago • written 13 months ago by Joe16k

It's pretty weird: I started except-ing the error to get those trees, and now it is not showing that error anymore. I have no clue on how to reconstruct the previous situation. Perhaps there was some I/O error and something got read/written wrongly from/to the file? I don't know what to think anymore!

ADD REPLYlink written 13 months ago by Macspider3.0k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 805 users visited in the last hour