diff options
author | Pjotr Prins | 2024-04-01 07:24:46 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-09-12 07:31:52 -0500 |
commit | 644100ea2e5e407eb06ccb292d85dd20b104beee (patch) | |
tree | 829b2e96885de2f6cb7284513ae1f5958dd2fcf0 /gn3/api | |
parent | de36e1fb9c39f6a644af3432b45d9297cd7cf42f (diff) | |
download | genenetwork3-644100ea2e5e407eb06ccb292d85dd20b104beee.tar.gz |
Getting Rqtl to run on fallback
Diffstat (limited to 'gn3/api')
-rw-r--r-- | gn3/api/general.py | 2 | ||||
-rw-r--r-- | gn3/api/rqtl.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/gn3/api/general.py b/gn3/api/general.py index 69ec343..891f992 100644 --- a/gn3/api/general.py +++ b/gn3/api/general.py @@ -64,7 +64,7 @@ def run_r_qtl(geno_filestr, pheno_filestr): """Run r_qtl command using the written rqtl_wrapper program """ - rqtl_wrapper = current_app.config["RQTL_WRAPPER"] + rqtl_wrapper = 'scripts/rqtl_wrapper.R' cmd = (f"Rscript {rqtl_wrapper} " f"{geno_filestr} {pheno_filestr}") return jsonify(run_cmd(cmd)), 201 diff --git a/gn3/api/rqtl.py b/gn3/api/rqtl.py index 3893275..36bc3da 100644 --- a/gn3/api/rqtl.py +++ b/gn3/api/rqtl.py @@ -6,6 +6,7 @@ from flask import current_app from flask import jsonify from flask import request +from gn3.debug import __pk__ from gn3.computations.rqtl import generate_rqtl_cmd, process_rqtl_mapping, \ process_rqtl_pairscan, process_perm_output from gn3.fs_helpers import assert_paths_exist @@ -38,7 +39,7 @@ run the rqtl_wrapper script and return the results as JSON rqtl_bool_kwargs.append(kwarg) rqtl_cmd = generate_rqtl_cmd( - rqtl_wrapper_cmd=current_app.config.get("RQTL_WRAPPER_CMD"), + rqtl_wrapper_cmd='scripts/rqtl_wrapper.R', rqtl_wrapper_kwargs=rqtl_kwargs, rqtl_wrapper_bool_kwargs=rqtl_bool_kwargs ) @@ -46,7 +47,7 @@ run the rqtl_wrapper script and return the results as JSON rqtl_output = {} if not os.path.isfile(os.path.join(current_app.config.get("TMPDIR"), "output", rqtl_cmd.get('output_file'))): - os.system(rqtl_cmd.get('rqtl_cmd')) + os.system(__pk__(rqtl_cmd.get('rqtl_cmd'))) if "pairscan" in rqtl_bool_kwargs: rqtl_output['results'] = process_rqtl_pairscan(rqtl_cmd.get('output_file'), genofile) |