else: potential_vals = range(FRAGMENT_SIZE-6*FRAGMENT_STD,FRAGMENT_SIZE+6*FRAGMENT_STD+1) FRAGLEN_VALS = [] for i in xrange(len(potential_vals)): if potential_vals[i] > READLEN: FRAGLEN_VALS.append(potential_vals[i]) FRAGLEN_PROB = [np.exp(-(((n-float(FRAGMENT_SIZE))**2)/(2*(FRAGMENT_STD**2)))) for n in FRAGLEN_VALS] FRAGLEN_DISTRIBUTION = DiscreteDistribution(FRAGLEN_PROB,FRAGLEN_VALS) """************************************************ **** MORE INPUT ERROR CHECKING ************************************************""" isInRange(READLEN, 10,1000000, 'Error: -R must be between 10 and 1,000,000') isInRange(COVERAGE, 0,1000000, 'Error: -c must be between 0 and 1,000,000') isInRange(PLOIDS, 1,100, 'Error: -p must be between 1 and 100') isInRange(OFFTARGET_SCALAR, 0,1, 'Error: -to must be between 0 and 1') if MUT_RATE != -1 and MUT_RATE != None: isInRange(MUT_RATE, 0,0.3, 'Error: -M must be between 0 and 0.3') if SE_RATE != -1 and SE_RATE != None: isInRange(SE_RATE, 0,0.3, 'Error: -E must be between 0 and 0.3') if NJOBS != 1: isInRange(NJOBS, 1,1000, 'Error: --job must be between 1 and 1,000') isInRange(MYJOB, 1,1000, 'Error: --job must be between 1 and 1,000') isInRange(MYJOB, 1,NJOBS, 'Error: job id must be less than or equal to number of jobs') if N_MAX_QUAL != -1: isInRange(N_MAX_QUAL, 1,40, 'Error: -N must be between 1 and 40')