diff options
author | Alexander Kabui | 2021-09-16 14:02:13 +0300 |
---|---|---|
committer | Alexander Kabui | 2021-09-16 14:02:13 +0300 |
commit | f53a8a98206b4e8aedbf4b86e49f41ea140c9c6a (patch) | |
tree | 3e1fe9132e04fc7c9b811ba745d473627077560a /gn3 | |
parent | 3d8f7f069d76cd6ee35b5e9d72d37e38721188d2 (diff) | |
download | genenetwork3-f53a8a98206b4e8aedbf4b86e49f41ea140c9c6a.tar.gz |
pass user input to call script
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/api/wgcna.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gn3/api/wgcna.py b/gn3/api/wgcna.py index a3bacdd..5d49493 100644 --- a/gn3/api/wgcna.py +++ b/gn3/api/wgcna.py @@ -1,13 +1,21 @@ """endpoint to run wgcna analysis""" from flask import Blueprint from flask import request +from flask import current_app + +from gn3.computations.wgcna import call_wgcna_script wgcna = Blueprint("wgcna", __name__) @wgcna.route("/run_wgcna", methods=["POST"]) def run_wgcna(): + """run wgcna:output should be a json with a the data""" + + wgcna_data = request.json + + wgcna_script = current_app.config["WGCNA_RSCRIPT"] - _wgcna_data = request.json + results = call_wgcna_script(wgcna_script, wgcna_data) - return "success", 200 + return results, 200 |