parser.add_argument('INFILE',type=str,help='path to the newick tree')
parser.add_argument('-r','--resolution',metavar='INT',default=1,help='number of leaves top prune at each iteration (default: 1)',type=int,nargs='?')
parser.add_argument('-X','--stop_at_X_leaves',metavar='0-n_leaves',default='0',help='stop pruning when the number of leaves = X',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',type=restricted_float,nargs='?')
parser.add_argument('-r','--resolution',metavar='INT',default=1,help='number of leaves to prune at each iteration (default: 1)',type=int,nargs='?')
parser.add_argument('-p','--solve_polytomies',help='resolve polytomies at random (default: FALSE)',action='store_true',default=False)
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='?')
parser.add_argument('-np','--no_plot',help='do not load matplotlib and plot (default: FALSE)',action='store_true',default=False)
parser.add_argument('-fp','--fine_plot',help='when --resolution > 1, plot RTL vs n leaves every time a leaf is pruned (default: FALSE => plot every X leaves (X = -r))',action='store_true',default=False)
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)
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='?')
########################################### LOOP THRU ALL LEAVES (replaced by joblib parallel line #############################################
# for leaf in leaves:
# counter1 = counter1 + 1
# print "iter find N : "+ str(counter1)
# N_list=find_N(t,leaf)
# print N_list
# if N_list:
# DLIST.update(N_list)
########################################### CALCULATE MATRIX DISTANCE into simple DICTIONARY very slow!! dendropy is orders of magnitude faster #############################################