tree from edge list

43 views
Skip to first unread message

almu...@googlemail.com

unread,
Apr 12, 2017, 9:05:20 AM4/12/17
to DendroPy Users

Dear colleagues,


I am doing some work on community detection in network (I use networkx) and would like to explore connection to the phylogenetic trees (…it might be a bad idea, since I have really no clue about the phylogenetic trees, but would like to play around with it anyway).


I have just discovered dendropy and the newick format.

My question is the following

Is there an easy way to create a tree in newick for an edge list or an adjeceny matrix

For example for the example from Wikipedia

https://en.wikipedia.org/wiki/Newick_format

one would give a list (with all leaf named)

x1 = [(F,A), (F,B), (F,E), (E,C), (E,D)]

and get

newick format as in (A,B,(C,D)E)F;

P.S: I apologize in advance I am missing something pretty obvious

almu...@googlemail.com

unread,
Apr 12, 2017, 9:34:17 AM4/12/17
to DendroPy Users
I actually realize that this does not need to be done in dendropy necessarily.  I will post the question on stack overflow
Reply all
Reply to author
Forward
0 new messages