aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/templates/wgcna_results.html1
-rwxr-xr-xwqflask/wqflask/views.py6
2 files changed, 5 insertions, 2 deletions
diff --git a/wqflask/wqflask/templates/wgcna_results.html b/wqflask/wqflask/templates/wgcna_results.html
index 2226f90c..5d654e94 100644
--- a/wqflask/wqflask/templates/wgcna_results.html
+++ b/wqflask/wqflask/templates/wgcna_results.html
@@ -4,6 +4,7 @@
{% block content %} <!-- Start of body -->
<div>
<h1>WGCNA Results</h1>
+ {{result}}
</div>
{% endblock %}
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index cd186078..cb7caf51 100755
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -180,8 +180,10 @@ def help():
@app.route("/wgcna", methods=('POST',))
def wcgna():
print("In wgcna, request.form is:", request.form)
- template_vars = wgcna_analysis.WGCNA(request.form)
- return render_template("wgcna_results.html")
+ wgcna = wgcna_analysis.WGCNA() # Start R, load the package and pointers and create the analysis
+ wgcnaA = wgcna.run_analysis(request.form) # Start the analysis, a wgcnaA object should be a separate long running thread
+ result = wgcna.process_results(wgcnaA) # After the analysis is finished store the result
+ return render_template("wgcna_results.html", **result) # Display them using the template
@app.route("/news")
def news_route():