aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kabui2021-09-16 14:02:13 +0300
committerAlexander Kabui2021-09-16 14:02:13 +0300
commitf53a8a98206b4e8aedbf4b86e49f41ea140c9c6a (patch)
tree3e1fe9132e04fc7c9b811ba745d473627077560a
parent3d8f7f069d76cd6ee35b5e9d72d37e38721188d2 (diff)
downloadgenenetwork3-f53a8a98206b4e8aedbf4b86e49f41ea140c9c6a.tar.gz
pass user input to call script
-rw-r--r--gn3/api/wgcna.py12
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