For D:10, 10 is the weight of edge between D and D_C. Anyway to adapt the weight as proportional length of edge into the dot language?
Convert From Newick To Dot Language
I want to plot tree like human kinome. Looks like only GraphViz can do that with Spring-Electrical Model for graph generation. A life of tree are shown here made by GraphViz.
However, my tree is in Newick format. Is there any easy way to convert Newick format to DOT language?
Thanks!
• 6,055 views
•
link
1 answer
OK, I've changed the code of one my my previous answer "newick to json:" http://plindenbaum.blogspot.fr/2012/07/parsing-newick-format-in-c-using-flex.html
Here is the code:
input:
echo "((D:10,C:4)D_C,B:4,A:13);" | ./a.out
output:
digraph G {
id6[label=""];
id3[label="D_C"];
id1[label="D:10"];
id3 -> id1
id2[label="C:4"];
id3 -> id2
id6 -> id3
id4[label="B:4"];
id6 -> id4
id5[label="A:13"];
id6 -> id5
}
• 761 views
•
link
• 0 views
•
link
yep, I know, but I'm lazy :-) have a look at the 'edge attributes http://www.graphviz.org/doc/info/attrs.html#d:weight and change the 'while' loop in the newick.y file.
• 0 views
•
link
Log in to answer this question.
googled and found: http://jean-paul.davalan.pagesperso-orange.fr/graphs/ph/index-en.html
That is not quit right. For example, you can try to paste: "((D:10,C:4)D_C,B:4,A:13)" as input. However, the result doesn't match the input. Probably, it only works for very specific Newick format.