Changeset 620 for mds-and-trees
- Timestamp:
- 09/30/16 02:43:38 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mds-and-trees/tree-genealogy.py
r619 r620 418 418 419 419 #TODO: better names for those parameters 420 parser.add_argument('-t', '--time', default='GENERATIONAL', dest='time', help='values on vertical axis (BIRTHS/GENERATIONAL /REAL); '420 parser.add_argument('-t', '--time', default='GENERATIONAL', dest='time', help='values on vertical axis (BIRTHS/GENERATIONAL(d)/REAL); ' 421 421 'BIRTHS: time measured as the number of births since the beginning; ' 422 422 'GENERATIONAL: time measured as number of ancestors; ' 423 423 'REAL: real time of the simulation') 424 parser.add_argument('-b', '--balance', default='DENSITY', dest='balance', help='method of placing nodes in the tree (RANDOM/MIN/DENSITY )')425 parser.add_argument('-s', '--scale', default='NONE', dest='scale', help='type of timescale added to the tree (NONE /SIMPLE)')426 parser.add_argument('-c', '--coloring', default='IMPORTANCE', dest="coloring", help='method of coloring the tree (NONE/IMPORTANCE /TYPE)')427 parser.add_argument('-d', '--dots', default='TYPE', dest='dots', help='method of drawing dots (individuals) (NONE/NORMAL/TYPE )')424 parser.add_argument('-b', '--balance', default='DENSITY', dest='balance', help='method of placing nodes in the tree (RANDOM/MIN/DENSITY(d))') 425 parser.add_argument('-s', '--scale', default='NONE', dest='scale', help='type of timescale added to the tree (NONE(d)/SIMPLE)') 426 parser.add_argument('-c', '--coloring', default='IMPORTANCE', dest="coloring", help='method of coloring the tree (NONE/IMPORTANCE(d)/TYPE)') 427 parser.add_argument('-d', '--dots', default='TYPE', dest='dots', help='method of drawing dots (individuals) (NONE/NORMAL/TYPE(d))') 428 428 parser.add_argument('-j', '--jitter', dest="jitter", action='store_true', help='draw horizontal positions of children from the normal distribution') 429 429 … … 444 444 args = parser.parse_args() 445 445 446 TIME = args.time 447 BALANCE = args.balance 448 DOT_STYLE = args.dots 449 COLORING = args.coloring 446 TIME = args.time.upper() 447 BALANCE = args.balance.upper() 448 DOT_STYLE = args.dots.upper() 449 COLORING = args.coloring.upper() 450 SCALE = args.scale.upper() 450 451 JITTER = args.jitter 452 if not TIME in ['BIRTHS', 'GENERATIONAL', 'REAL']\ 453 or not BALANCE in ['RANDOM', 'MIN', 'DENSITY']\ 454 or not DOT_STYLE in ['NONE', 'NORMAL', 'TYPE']\ 455 or not COLORING in ['NONE', 'IMPORTANCE', 'TYPE']\ 456 or not SCALE in ['NONE', 'SIMPLE']: 457 print("Incorrect value of one of the parameters! Closing the program.") #TODO don't be lazy, figure out which parameter is wrong... 458 return 459 451 460 452 461 svg_mutation_line_style += hex_to_style(args.color_mut) … … 481 490 draw_spine() 482 491 483 draw_scale(dir, args.scale)492 draw_scale(dir, SCALE) 484 493 485 494 svg_file.write("</svg>")
Note: See TracChangeset
for help on using the changeset viewer.