diff options
author | Pjotr Prins | 2015-04-03 13:17:56 +0200 |
---|---|---|
committer | Pjotr Prins | 2015-04-03 13:17:56 +0200 |
commit | 3c738e6901ecc2ec0b4c1c667f20ebe3dc186f5c (patch) | |
tree | cac5eaea519706517a96c33443f463d1759d8e2a | |
parent | fc6f0ef9fc8d2607e70c775c51ca55f50806cc7a (diff) | |
download | genenetwork2-3c738e6901ecc2ec0b4c1c667f20ebe3dc186f5c.tar.gz |
Rename gwas_using_redis to gwas_with_redis
-rw-r--r-- | wqflask/wqflask/my_pylmm/pyLMM/lmm.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py index 9e25f56d..ad6375e9 100644 --- a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py @@ -795,7 +795,7 @@ class LMM: pl.title(title) -def gwas_without_redis(species,k,y,geno,cov,reml,refit,inputfn,new_code): +def run_gwas(species,k,y,geno,cov,reml,refit,inputfn,new_code): """ Invoke pylmm using a genotype (SNP) iterator """ @@ -824,10 +824,10 @@ def gwas_without_redis(species,k,y,geno,cov,reml,refit,inputfn,new_code): refit = refit) return ps,ts -def gwas_using_redis(key,species,new_code=True): +def gwas_with_redis(key,species,new_code=True): """ Invoke pylmm using Redis as a container. new_code runs the new - version + version. All the Redis code goes here! """ json_params = Redis.get(key) @@ -849,7 +849,7 @@ def gwas_using_redis(key,species,new_code=True): v = np.array(v) return v - ps,ts = gwas_without_redis(species,narray('kinship_matrix'),narray('pheno_vector'),narray('genotype_matrix'),narray('covariate_matrix'),params['restricted_max_likelihood'],params['refit'],params['input_file_name'],new_code) + ps,ts = run_gwas(species,narray('kinship_matrix'),narray('pheno_vector'),narray('genotype_matrix'),narray('covariate_matrix'),params['restricted_max_likelihood'],params['refit'],params['input_file_name'],new_code) results_key = "pylmm:results:" + params['temp_uuid'] @@ -888,7 +888,7 @@ def gn2_load_redis(key,species,kinship,pheno,geno,new_code=True): Redis.set(key, json_params) Redis.expire(key, 60*60) - return gwas_using_redis(key,species,new_code) + return gwas_with_redis(key,species,new_code) def gn2_load_redis_iter(key,species,kinship,pheno,geno_iterator): """ @@ -922,7 +922,7 @@ def gn2_load_redis_iter(key,species,kinship,pheno,geno_iterator): json_params = json.dumps(params) Redis.set(key, json_params) Redis.expire(key, 60*60) - return gwas_using_redis(key,species) + return gwas_with_redis(key,species) # This is the main function used by Genenetwork2 (with environment) # @@ -938,7 +938,7 @@ def gn2_main(): key = opts.key species = opts.species - gwas_using_redis(key,species) + gwas_with_redis(key,species) if __name__ == '__main__': |