aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
authorzsloan2021-05-17 20:11:15 +0000
committerzsloan2021-05-17 20:11:15 +0000
commit9b628abcee86ef29e869b92a66b6034c1b63359d (patch)
tree07aa5fa1945081a976022c8574682ea9a032a477 /gn3/api
parent6c8ab5537c7fb7eb94c62415269e193516283f6d (diff)
downloadgenenetwork3-9b628abcee86ef29e869b92a66b6034c1b63359d.tar.gz
Add rqtl.py for rqtl endpoints
Diffstat (limited to 'gn3/api')
-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