diff options
author | Pjotr Prins | 2015-02-20 15:02:30 +0300 |
---|---|---|
committer | Pjotr Prins | 2015-02-20 15:02:30 +0300 |
commit | 7fee695b79984912dd610a55e84db602780becac (patch) | |
tree | c7d2c928fbe22d90abc876da38371b993a75f08d | |
parent | 61b8ae229687612b4c9d4a0b089a9ef0ef47ff2c (diff) | |
download | genenetwork2-7fee695b79984912dd610a55e84db602780becac.tar.gz |
Splitting out handlers
-rwxr-xr-x | wqflask/wqflask/my_pylmm/pyLMM/lmm.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py index 8de3b3a7..d7d60e6e 100755 --- a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py @@ -714,6 +714,7 @@ class LMM: pl.ylabel("Probability of data") pl.title(title) +# This is the main function used by Genenetwork2 (with environment) def gn2_main(): parser = argparse.ArgumentParser(description='Run pyLMM') parser.add_argument('-k', '--key') @@ -755,6 +756,15 @@ def gn2_main(): Redis.rpush(results_key, json_results) Redis.expire(results_key, 60*60) +# This is the main version used without Genenetwork2's environment +def cli_main(): + ps, ts = run_human(pheno_vector = np.array(params['pheno_vector']), + covariate_matrix = np.array(params['covariate_matrix']), + plink_input_file = params['input_file_name'], + kinship_matrix = np.array(params['kinship_matrix']), + refit = params['refit'], + tempdata = tempdata) + if __name__ == '__main__': if has_gn2: gn2_main() |