aboutsummaryrefslogtreecommitdiff
path: root/gn3/api/rqtl.py
blob: 8dd4bb797051d71302ede474ec546227cea36a5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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")