Index: mds-and-trees/tree-genealogy.py
===================================================================
--- mds-and-trees/tree-genealogy.py	(revision 577)
+++ mds-and-trees/tree-genealogy.py	(revision 585)
@@ -17,6 +17,6 @@
 
 svg_line_style = 'stroke="rgb(90%,10%,16%)" stroke-width="1" stroke-opacity="0.7"'
-svg_mutation_line_style = 'stroke="black" stroke-width="1" stroke-opacity="0.7"'
-svg_crossover_line_style = 'stroke="darkviolet" stroke-width="1" stroke-opacity="0.7"'
+svg_mutation_line_style = 'stroke-width="1"'
+svg_crossover_line_style = 'stroke-width="1"'
 svg_spine_line_style = 'stroke="rgb(0%,90%,40%)" stroke-width="2" stroke-opacity="1"'
 svg_scale_line_style = 'stroke="black" stroke-width="0.5" stroke-opacity="1" stroke-dasharray="5, 5"'
@@ -27,4 +27,25 @@
 
 svg_scale_text_style = 'style="font-family: Arial; font-size: 12; fill: #000000;"'
+
+def hex_to_style(hex):
+    if hex[0] == "#":
+        hex = hex[1:]
+
+    if len(hex) == 6 or len(hex) == 8:
+        try:
+            int(hex, 16)
+        except:
+            print("Wrong characters in the color's hex #" + hex + "! Assuming black.")
+            return ' stroke="black" stroke-opacity="0.5" '
+        red = 100*int(hex[0:2], 16)/255
+        green = 100*int(hex[2:4], 16)/255
+        blue = 100*int(hex[4:6], 16)/255
+        opacity = 0.5
+        if len(hex) == 8:
+            opacity = int(hex[6:8], 16)/255
+        return ' stroke="rgb(' +str(red)+ '%,' +str(green)+ '%,' +str(blue)+ '%)" stroke-opacity="' +str(opacity)+ '" '
+    else:
+        print("Wrong number of digits in the color's hex #" + hex + "! Assuming black.")
+        return ' stroke="black" stroke-opacity="0.5" '
 
 def svg_add_line(from_pos, to_pos, style=svg_line_style):
@@ -41,4 +62,6 @@
     from_col = [100, 70, 0]
     to_col = [60, 0, 0]
+    from_col = [0, 0, 0]
+    to_col = [80, 0, 80]
     # lava
     # from_col = [100, 80, 0]
@@ -264,5 +287,5 @@
         if DOT_STYLE == "NONE":
             continue
-        elif DOT_STYLE == "KIND":
+        elif DOT_STYLE == "TYPE":
             dot_style = svg_generate_dot_style(kind[c] if c in kind else 0) #type
         else: # NORMAL, default
@@ -281,5 +304,5 @@
     if DOT_STYLE == "NONE":
         return
-    elif DOT_STYLE == "KIND":
+    elif DOT_STYLE == "TYPE":
         dot_style = svg_generate_dot_style(kind[firstnode] if firstnode in kind else 0)
     else: # NORMAL, default
@@ -375,5 +398,7 @@
 
 def main():
-    global svg_file, min_skeleton_depth, args, TIME, BALANCE, DOT_STYLE, COLORING, JITTER
+    global svg_file, min_skeleton_depth, args, \
+        TIME, BALANCE, DOT_STYLE, COLORING, JITTER, \
+        svg_mutation_line_style, svg_crossover_line_style
 
     parser = argparse.ArgumentParser(description='Process some integers.')
@@ -393,13 +418,16 @@
 
     #TODO: better names for those parameters
-    parser.add_argument('-t', '--time', default='BIRTHS', dest='time', help='values on vertical axis (BIRTHS/GENERATIONAL/REAL); '
+    parser.add_argument('-t', '--time', default='GENERATIONAL', dest='time', help='values on vertical axis (BIRTHS/GENERATIONAL/REAL); '
                                                                       'BIRTHS: time measured as the number of births since the beggining; '
                                                                       'GENERATIONAL: time measured as number of ancestors; '
                                                                       'REAL: real time of the simulation')
-    parser.add_argument('-b', '--balance', default='MIN', dest='balance', help='method of placing node in the tree (RANDOM/MIN/DENSITY)')
+    parser.add_argument('-b', '--balance', default='DENSITY', dest='balance', help='method of placing node in the tree (RANDOM/MIN/DENSITY)')
     parser.add_argument('-s', '--scale', default='NONE', dest='scale', help='type of timescale added to the tree (NONE/SIMPLE)')
     parser.add_argument('-c', '--coloring', default='IMPORTANCE', dest="coloring", help='method of coloring the tree (NONE/IMPORTANCE/TYPE)')
-    parser.add_argument('-d', '--dots', default='NORMAL', dest='dots', help='method of drawing dots (individuals) (NONE/NORMAL/TYPE)')
+    parser.add_argument('-d', '--dots', default='TYPE', dest='dots', help='method of drawing dots (individuals) (NONE/NORMAL/TYPE)')
     parser.add_argument('-j', '--jitter', dest="jitter", action='store_true', help='draw horizontal positions of children from the normal distribution')
+
+    parser.add_argument('--color-mut', default="#000000", dest="color_mut", help='color of clone/mutation lines in rgba (e.g. #FF60B240) for TYPE coloring')
+    parser.add_argument('--color-cross', default="#660198", dest="color_cross", help='color of crossover lines in rgba (e.g. #FF60B240) for TYPE coloring')
 
     parser.add_argument('--min-skeleton-depth', type=int, default=2, dest='min_skeleton_depth', help='minimal distance from the leafs for the nodes in the skeleton')
@@ -421,4 +449,7 @@
     COLORING = args.coloring
     JITTER = args.jitter
+
+    svg_mutation_line_style += hex_to_style(args.color_mut)
+    svg_crossover_line_style += hex_to_style(args.color_cross)
 
     dir = args.input
