aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/api')
-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