From 7fee695b79984912dd610a55e84db602780becac Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 20 Feb 2015 15:02:30 +0300 Subject: Splitting out handlers --- wqflask/wqflask/my_pylmm/pyLMM/lmm.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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() -- cgit v1.2.3