diff options
Diffstat (limited to 'gn3/api')
| -rw-r--r-- | gn3/api/correlation.py | 6 | ||||
| -rw-r--r-- | gn3/api/ctl.py | 5 | ||||
| -rw-r--r-- | gn3/api/wgcna.py | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/gn3/api/correlation.py b/gn3/api/correlation.py index 6af96d7..3667a24 100644 --- a/gn3/api/correlation.py +++ b/gn3/api/correlation.py @@ -9,7 +9,6 @@ from flask import Blueprint from flask import request from flask import current_app -from gn3.settings import SQL_URI from gn3.db_utils import database_connection from gn3.commands import run_sample_corr_cmd from gn3.responses.pcorrs_responses import build_response @@ -144,7 +143,10 @@ def partial_correlation(): cmd=command, job_queue=compute_job_queue(current_app), options={ - "env": {"PYTHONPATH": ":".join(sys.path), "SQL_URI": SQL_URI}, + "env": { + "PYTHONPATH": ":".join(sys.path), + "SQL_URI": current_app.config["SQL_URI"] + }, }, log_level=logging.getLevelName( current_app.logger.getEffectiveLevel()).lower()) diff --git a/gn3/api/ctl.py b/gn3/api/ctl.py index ac33d63..39c286f 100644 --- a/gn3/api/ctl.py +++ b/gn3/api/ctl.py @@ -2,7 +2,7 @@ from flask import Blueprint from flask import request -from flask import jsonify +from flask import jsonify, current_app from gn3.computations.ctl import call_ctl_script @@ -18,7 +18,8 @@ def run_ctl(): """ ctl_data = request.json - (cmd_results, response) = call_ctl_script(ctl_data) + (cmd_results, response) = call_ctl_script( + ctl_data, current_app.config["TMPDIR"]) return (jsonify({ "results": response }), 200) if response is not None else (jsonify({"error": str(cmd_results)}), 401) diff --git a/gn3/api/wgcna.py b/gn3/api/wgcna.py index fa044cf..5468a2e 100644 --- a/gn3/api/wgcna.py +++ b/gn3/api/wgcna.py @@ -17,7 +17,9 @@ def run_wgcna(): wgcna_script = current_app.config["WGCNA_RSCRIPT"] - results = call_wgcna_script(wgcna_script, wgcna_data) + results = call_wgcna_script(wgcna_script, + wgcna_data, + current_app.config["TMPDIR"]) if results.get("data") is None: return jsonify(results), 401 |
