Index: /mds-and-trees/tree-genealogy.py
===================================================================
--- /mds-and-trees/tree-genealogy.py	(revision 617)
+++ /mds-and-trees/tree-genealogy.py	(revision 618)
@@ -261,59 +261,4 @@
 # ------------------------------------
 
-def draw_children_recurrent(node, max_depth):
-    global visited
-
-    for c in inv_nodes[node]:
-
-        # we want to draw the node just once
-        if not all_parents_visited(c):
-            continue
-        else:
-            visited[c] = True
-
-        if c in inv_nodes:
-            draw_children_recurrent(c, max_depth)
-
-        line_style = ""
-        if COLORING == "NONE":
-            line_style = svg_line_style
-        elif COLORING == "TYPE":
-            line_style = (svg_mutation_line_style if len(nodes[c]) == 1 else svg_crossover_line_style)
-        else: # IMPORTANCE, default
-            line_style = svg_generate_line_style(depth[c]/max_depth)
-
-        for k, v in sorted(nodes[c].items()):
-            svg_add_line( (w_margin+w_no_margs*(positions[k][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[k][1]/max_height),
-                (w_margin+w_no_margs*(positions[c][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[c][1]/max_height), line_style)
-
-        if DOT_STYLE == "NONE":
-            continue
-        elif DOT_STYLE == "TYPE":
-            dot_style = svg_generate_dot_style(kind[c] if c in kind else 0) #type
-        else: # NORMAL, default
-            dot_style = svg_clear_dot_style #svg_generate_dot_style(depth[c]/max_depth)
-        svg_add_dot( (w_margin+w_no_margs*(positions[c][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[c][1]/max_height), dot_style)
-        #svg_add_text( str(depth[c]), (w_margin+w_no_margs*(positions[c][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[c][1]/max_height), "end")
-
-def draw_children():
-    global visited
-    visited = {}
-    visited[firstnode] = True
-
-    max_depth = 0
-    for k, v in depth.items():
-            max_depth = max(max_depth, v)
-    draw_children_recurrent(firstnode, max_depth)
-
-    if DOT_STYLE == "NONE":
-        return
-    elif DOT_STYLE == "TYPE":
-        dot_style = svg_generate_dot_style(kind[firstnode] if firstnode in kind else 0)
-    else: # NORMAL, default
-        dot_style = svg_clear_dot_style #svg_generate_dot_style(depth[c]/max_depth)
-    svg_add_dot( (w_margin+w_no_margs*(positions[firstnode][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[firstnode][1]/max_height), dot_style)
-
-
-
 def draw_children_norec():
     global visited
@@ -329,35 +274,31 @@
         current_node = nodes_to_visit[0]
 
-        for c in inv_nodes[current_node]:
-
-            # we want to draw the node just once
-            if not all_parents_visited(c):
-                continue
-            else:
-                visited[c] = True
-
-            if c in inv_nodes:
-                nodes_to_visit.append(c)
-
-            line_style = ""
-            if COLORING == "NONE":
-                line_style = svg_line_style
-            elif COLORING == "TYPE":
-                line_style = (svg_mutation_line_style if len(nodes[c]) == 1 else svg_crossover_line_style)
-            else: # IMPORTANCE, default
-                line_style = svg_generate_line_style(depth[c]/max_depth)
-
-            for k, v in sorted(nodes[c].items()):
-                svg_add_line( (w_margin+w_no_margs*(positions[k][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[k][1]/max_height),
-                    (w_margin+w_no_margs*(positions[c][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[c][1]/max_height), line_style)
-
-            if DOT_STYLE == "NONE":
-                continue
-            elif DOT_STYLE == "TYPE":
-                dot_style = svg_generate_dot_style(kind[c] if c in kind else 0) #type
-            else: # NORMAL, default
-                dot_style = svg_clear_dot_style #svg_generate_dot_style(depth[c]/max_depth)
-            svg_add_dot( (w_margin+w_no_margs*(positions[c][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[c][1]/max_height), dot_style)
-            #svg_add_text( str(depth[c]), (w_margin+w_no_margs*(positions[c][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[c][1]/max_height), "end")
+        if current_node in inv_nodes:
+            for c in inv_nodes[current_node]: # inv_node => p->c
+
+                if not c in nodes_to_visit:
+                    nodes_to_visit.append(c)
+
+                line_style = ""
+                if COLORING == "NONE":
+                    line_style = svg_line_style
+                elif COLORING == "TYPE":
+                    line_style = (svg_mutation_line_style if len(nodes[c]) == 1 else svg_crossover_line_style)
+                else: # IMPORTANCE, default
+                    line_style = svg_generate_line_style(depth[c]/max_depth)
+
+                svg_add_line( (w_margin+w_no_margs*(positions[current_node][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[current_node][1]/max_height),
+                        (w_margin+w_no_margs*(positions[c][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[c][1]/max_height), line_style)
+
+        # we want to draw the node just once
+        if DOT_STYLE == "NONE":
+            continue
+        elif DOT_STYLE == "TYPE":
+            dot_style = svg_generate_dot_style(kind[current_node] if current_node in kind else 0) #type
+        else: # NORMAL, default
+            dot_style = svg_clear_dot_style #svg_generate_dot_style(depth[c]/max_depth)
+        svg_add_dot( (w_margin+w_no_margs*(positions[current_node][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[current_node][1]/max_height), dot_style)
+        #svg_add_text( str(depth[current_node]), (w_margin+w_no_margs*(positions[current_node][0]-min_width)/(max_width-min_width),
+        # h_margin+h_no_margs*positions[current_node][1]/max_height), "end")
 
         # we remove the current node from the list
@@ -366,12 +307,4 @@
         if len(nodes_to_visit) == 0:
             break
-
-    if DOT_STYLE == "NONE":
-        return
-    elif DOT_STYLE == "TYPE":
-        dot_style = svg_generate_dot_style(kind[firstnode] if firstnode in kind else 0)
-    else: # NORMAL, default
-        dot_style = svg_clear_dot_style #svg_generate_dot_style(depth[c]/max_depth)
-    svg_add_dot( (w_margin+w_no_margs*(positions[firstnode][0]-min_width)/(max_width-min_width), h_margin+h_no_margs*positions[firstnode][1]/max_height), dot_style)
 
 def draw_spine_recurrent(node):
@@ -558,5 +491,5 @@
 
     if args.draw_tree:
-        draw_children()
+        draw_children_norec()
     if args.draw_skeleton:
         draw_skeleton()
