etetoolkit / ete

Python package for building, comparing, annotating, manipulating and visualising trees. It provides a comprehensive API and a collection of command line tools, including utilities to work with the NCBI taxonomy tree.
http://etetoolkit.org
GNU General Public License v3.0
777 stars 214 forks source link

Plot Horizontal Gene Transfer Events #161

Open jhcepas opened 8 years ago

jhcepas commented 8 years ago

Proposal for HGT visualization:

Similar to the functionality of node.add_face, a new method will be added to the Tree instance to control de visualization of horizontal links between nodes (i.e. HGT events).

The proposed method is:

nodeA.add_link(nodeB, type="node-node", text, color=..., ...)

Options controling the aspect of "links" should include:

The prototype is able to draw links like this:

Fig1

Fig2

tanaes commented 8 years ago

This would be great! There are really limited options out there currently for visualizing these events. We were talking with @ekopylova about this recently.

I think this would also play will with issue #112, if transfer events can be represented as coming from/going to nodes as well as tips -- quick way to check that events weren't inferred as going backwards in time.

Because trees with lots of links can get really cluttered, it would also be really neat to have some sort of summarization mechanism -- perhaps choosing a set of internal nodes that would roll together the links from dependent nodes.

ekopylova commented 8 years ago

Agree, this would be great!

ekopylova commented 7 years ago

I was wondering if there can be an ETA on this? Would be great to be able to use it for our HGT visualization. Thanks!

jhcepas commented 7 years ago

there is some progress by @AlexBardill, https://github.com/etetoolkit/ete/pull/247 hopefully some of the functionality is available soon.