From 9b628abcee86ef29e869b92a66b6034c1b63359d Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 17 May 2021 20:11:15 +0000 Subject: Add rqtl.py for rqtl endpoints --- gn3/api/rqtl.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gn3/api/rqtl.py (limited to 'gn3/api/rqtl.py') 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 -- cgit v1.2.3