ETE3 TreeError: 'Nodes are not connected!': how to fix?
0
0
Entering edit mode
5.3 years ago

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 tree.py 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 ]
t.prune(Leaves_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?

ETE phylome phylogenetics nodes TreeError • 2.6k views
ADD COMMENT
0
Entering edit mode

Is your tree file malformed in some way?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

Can you please tell how you -except the error. I'm facing the same issue. Thanks.

ADD REPLY
0
Entering edit mode

The same way you would except any other error in python, nothing fancy.

ADD REPLY

Login before adding your answer.

Traffic: 1953 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6