########################################## PLOT tree length decay #######################
...
...
@@ -230,7 +234,7 @@ parser.add_argument('-r','--resolution', metavar='INT', default=1,help='number o
parser.add_argument('-c','--cpu',metavar='INT',default=1,help='number of cpu to use (default: 1)',type=int,nargs='?')
parser.add_argument('-v','--verbose',metavar='0,1,2',default='0',help='0: silent, 1: show progress, 2: print tree at each iteration, 3: only for testing (findN), 4: only for testing (prune_t) (default: 1)',type=int,nargs='?',choices=[0,1,2,3,4])
parser.add_argument('-p','--solve_polytomies',help='resolve polytmies at random (default: FALSE)',action='store_true',default=False)
### yet to implemen
parser.add_argument('-np','--no_plot',help='do not load matplotlib and plot (default: FALSE)',action='store_true',default=False)
parser.add_argument('-X','--stop_at_X_leaves',metavar='0-n_leaves',default='0',help='stop pruning when the number of leaves fall below X (integer)',type=int,nargs='?')
parser.add_argument('-RTL','--stop_at_RTL',metavar='0-1',default='0',help='stop pruning when the relative tree length falls below RTL (decimal number between 0 and 1)',type=restricted_float,nargs='?')
parser.add_argument('-lp','--leaves_pair',metavar='0,1,2',default=2,help='After the pair of leaves with the smallest distance is dentified Treemmer prunes: 0: the longest leaf\n1: the shortest leaf\n2: random choice (default)',type=int,nargs='?')
...
...
@@ -252,7 +256,7 @@ stop=0
TOT_TL=calculate_TL(t)
TL=TOT_TL
ori_length=len(t)
ifarguments.solve_polytomies:
t.resolve_polytomy()
...
...
@@ -274,7 +278,8 @@ if arguments.verbose > 0:
print"\nTreemmer will prune "+str(arguments.resolution)+" leaves at each iteration"
print"\nTreemmer will use "+str(arguments.cpu)+" cpu(s)"