def makeLDreduced(basename, infpath=None, outfpath=None, plinke='plink', forcerebuild=False, returnFname=False, winsize='60', winmove='40', r2thresh='0.1'):
 outbase = os.path.join(outfpath, basename)
 inbase = os.path.join(infpath)
 plinktasks = []
 vclbase = [plinke, '--noweb']
 plinktasks += [['--bfile', inbase, ('--indep-pairwise %s %s %s' % (winsize, winmove, r2thresh)), ('--out %s' % outbase)], ['--bfile', inbase, ('--extract %s.prune.in --make-bed --out %s' % (outbase, outbase))]]
 vclbase = [plinke, '--noweb']
 pruneLD(plinktasks=plinktasks, cd=outfpath, vclbase=vclbase)

def makeLDreduced ( basename , infpath = None , outfpath = None , plinke = 'plink' , forcerebuild = False , returnFname = False , winsize = '60' , winmove = '40' , r2thresh = '0.1' ) : outbase = os . path . join ( outfpath , basename ) inbase = os . path . join ( infpath ) plinktasks = [ ] vclbase = [ plinke , '--noweb' ] plinktasks += [ [ '--bfile' , inbase , ( '--indep-pairwise %s %s %s' % ( winsize , winmove , r2thresh ) ) , ( '--out %s' % outbase ) ] , [ '--bfile' , inbase , ( '--extract %s.prune.in --make-bed --out %s' % ( outbase , outbase ) ) ] ] vclbase = [ plinke , '--noweb' ] pruneLD ( plinktasks = plinktasks , cd = outfpath , vclbase = vclbase )
not there so make and leave in output dir for post job hook to copy back into input extra files path for next time .