diff options
author | Pjotr Prins | 2015-03-14 16:52:47 +0300 |
---|---|---|
committer | Pjotr Prins | 2015-03-14 16:52:47 +0300 |
commit | c784f2fb2e3e4ad6cb6d6425aa7ec1596c2bd132 (patch) | |
tree | 71200c71e2ed5f5812dee1708701bf5944209cd9 /wqflask | |
parent | 58f43e9e767890031c77e44d10939c48bc1c81fe (diff) | |
download | genenetwork2-c784f2fb2e3e4ad6cb6d6425aa7ec1596c2bd132.tar.gz |
Allow queue to be 2xCPU. Disable output files
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/my_pylmm/pyLMM/kinship.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/wqflask/wqflask/my_pylmm/pyLMM/kinship.py b/wqflask/wqflask/my_pylmm/pyLMM/kinship.py index 967eca81..1383c782 100644 --- a/wqflask/wqflask/my_pylmm/pyLMM/kinship.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/kinship.py @@ -71,7 +71,6 @@ def compute_matrixMult(job,W,q = None): def f_init(q): compute_matrixMult.q = q - # Calculate the kinship matrix from G (SNPs as rows!), returns K # def kinship(G,options): @@ -119,7 +118,7 @@ def kinship(G,options): # Multi-core results.append(p.apply_async(compute_matrixMult, (job,W))) # Do we have a result? - while (len(results)-completed>cpu_num): + while (len(results)-completed>cpu_num*2): try: j,x = q.get_nowait() if options.verbose: sys.stderr.write("Job "+str(j)+" finished\n") @@ -141,16 +140,17 @@ def kinship(G,options): completed += 1 K = K / float(snps) - outFile = 'runtest.kin' - if options.verbose: sys.stderr.write("Saving Kinship file to %s\n" % outFile) - np.savetxt(outFile,K) - - if options.saveKvaKve: - if options.verbose: sys.stderr.write("Obtaining Eigendecomposition\n") - Kva,Kve = linalg.eigh(K) - if options.verbose: sys.stderr.write("Saving eigendecomposition to %s.[kva | kve]\n" % outFile) - np.savetxt(outFile+".kva",Kva) - np.savetxt(outFile+".kve",Kve) + + # outFile = 'runtest.kin' + # if options.verbose: sys.stderr.write("Saving Kinship file to %s\n" % outFile) + # np.savetxt(outFile,K) + + # if options.saveKvaKve: + # if options.verbose: sys.stderr.write("Obtaining Eigendecomposition\n") + # Kva,Kve = linalg.eigh(K) + # if options.verbose: sys.stderr.write("Saving eigendecomposition to %s.[kva | kve]\n" % outFile) + # np.savetxt(outFile+".kva",Kva) + # np.savetxt(outFile+".kve",Kve) return K |