aboutsummaryrefslogtreecommitdiff
path: root/gn3/api/rqtl.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/api/rqtl.py')
-rw-r--r--gn3/api/rqtl.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/gn3/api/rqtl.py b/gn3/api/rqtl.py
new file mode 100644
index 0000000..8dd4bb7
--- /dev/null
+++ b/gn3/api/rqtl.py
@@ -0,0 +1,19 @@
+import os
+
+from flask import Blueprint
+from flask import current_app
+from flask import request
+
+rqtl = Blueprint("rqtl", __name__)
+
+@rqtl.route("/compute", methods=["POST"])
+def compute():
+ working_dir = os.path.join(current_app.config.get("TMPDIR"))
+
+ genofile = request.form['geno_file']
+ phenofile = request.form['pheno_file']
+
+ if not do_paths_exist([genofile, phenofile]):
+ raise FileNotFoundError
+
+ return current_app.config.get("RQTL_WRAPPER_CMD") \ No newline at end of file