aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorDannyArends2016-03-22 16:36:32 +0100
committerPjotr Prins2016-04-20 10:12:10 +0000
commiteb2bee6dce67f7e1ca04bd96a477e2eae8fcb543 (patch)
treefb3c1a3b1335f7d7c65741894b0d52f481d7f54e /wqflask
parent5847ac9fba55f6c75ca3f8ee12047e10efbf8341 (diff)
downloadgenenetwork2-eb2bee6dce67f7e1ca04bd96a477e2eae8fcb543.tar.gz
Connecting the CTL analysis to the collection overview, by adding a button
Diffstat (limited to 'wqflask')
-rwxr-xr-xwqflask/wqflask/templates/collections/view.html12
-rw-r--r--wqflask/wqflask/views.py9
2 files changed, 21 insertions, 0 deletions
diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html
index f92d9984..c1563b9c 100755
--- a/wqflask/wqflask/templates/collections/view.html
+++ b/wqflask/wqflask/templates/collections/view.html
@@ -55,6 +55,18 @@
<input type="submit" class="btn btn-primary" value="WGCNA Analysis" />
</div>
</form>
+ <form action="/ctl_setup" method="post">
+ {% if uc %}
+ <input type="hidden" name="uc_id" id="uc_id" value="{{ uc.id }}" />
+ {% endif %}
+ <input type="hidden" name="trait_list" id="trait_list" value= "
+ {% for this_trait in trait_obs %}
+ {{ this_trait.name }}:{{ this_trait.dataset.name }},
+ {% endfor %}" >
+ <div class="col-xs-2 controls">
+ <input type="submit" class="btn btn-primary" value="CTL Analysis" />
+ </div>
+ </form>
<form action="/heatmap" method="post">
{% if uc %}
<input type="hidden" name="uc_id" id="uc_id" value="{{ uc.id }}" />
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 7f331492..5e8fb1fe 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -196,6 +196,15 @@ def wcgna_results():
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("/ctl_setup", methods=('POST',))
+def ctl_setup():
+ print("In ctl, request.form is:", request.form) # We are going to get additional user input for the analysis
+ return render_template("ctl_setup.html", **request.form) # Display them using the template
+
+@app.route("/ctl_results", methods=('POST',))
+def ctl_results():
+ print("In ctl, request.form is:", request.form)
+ return render_template("ctl_results.html", **result) # Display them using the template
@app.route("/news")
def news_route():