aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/api')
-rw-r--r--gn3/api/general.py2
-rw-r--r--gn3/api/rqtl.py5
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)