Any way to draw a DendroPy tree?

70 views
Skip to first unread message

Alexey Morozov

unread,
Jun 14, 2018, 9:26:51 AM6/14/18
to DendroPy Users
Well, the topic says it. I need to draw some unrooted dendropy Tree objects. I also need to display the node annotations, which prevents me from simply exporting it to Newick and using Treegraph or whatever. I would also like to be able to place annotations precisely (in my case they are associated with the neighbouring nodes), but that's not absolutely necessary.

AFAIK dendropy only supports ASCII outputs, so what are the possible workarounds here?

Jeet Sukumaran

unread,
Jun 14, 2018, 9:31:55 AM6/14/18
to dendrop...@googlegroups.com, Alexey Morozov
(Graphical) visualization is the most under-developed part of DendroPy.,
For tree visualization of any kind in Python, I suggest that you look at
Ete2. It is an *excellent* library for this. Currently the best way to
get a tree from DendroPy to Ete2 is to generate the Newick/NEXUS/NeXML
string and pass it (internally) to Ete2 to be consumed.
> --
> You received this message because you are subscribed to the Google
> Groups "DendroPy Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to dendropy-user...@googlegroups.com
> <mailto:dendropy-user...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Alexey Morozov

unread,
Jun 14, 2018, 9:35:43 AM6/14/18
to Jeet Sukumaran, dendrop...@googlegroups.com
Thanky you for a swift response. I'm not sure, do any of the intermefiate formats support arbitrary node metadata? In my case it's not support or some other common thing, it's just a bunch of numbers and/or letters attached to every node.

чт, 14 июня 2018 г., 21:31 Jeet Sukumaran <jeetsu...@gmail.com>:

Jeet Sukumaran

unread,
Jun 14, 2018, 9:38:47 AM6/14/18
to Alexey Morozov, dendrop...@googlegroups.com
DendroPy will output the metadata in a variety of formats with the
proper keywords passed to the writing methods, as per its documentation.
You will have to check with the Ete2 documentation what format it can
consume. The most robust format for the exchange would be NeXML if Ete2
supports this, I think.

On 06/14/2018 09:34 AM, Alexey Morozov wrote:
> Thanky you for a swift response. I'm not sure, do any of the
> intermefiate formats support arbitrary node metadata? In my case it's
> not support or some other common thing, it's just a bunch of numbers
> and/or letters attached to every node.
>
> чт, 14 июня 2018 г., 21:31 Jeet Sukumaran <jeetsu...@gmail.com
> <mailto:jeetsu...@gmail.com>>:
> <mailto:dendropy-users%2Bunsu...@googlegroups.com>
> > <mailto:dendropy-user...@googlegroups.com
> <mailto:dendropy-users%2Bunsu...@googlegroups.com>>.
Reply all
Reply to author
Forward
0 new messages