aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-06-16 21:15:27 +0000
committerzsloan2021-06-16 21:15:27 +0000
commitd723eb260bfd9c707f6e282037c4e42670bdf48e (patch)
treefb95f14caaa1155639fed4a393daea88d1be81a1
parent04a869d708bafe805441d70ff3c588e1e244d439 (diff)
downloadgenenetwork2-d723eb260bfd9c707f6e282037c4e42670bdf48e.tar.gz
Changed views.py to call the correlation code using the GN3 API + a function in show_corr_results for setting other template vars (might change this later)
-rw-r--r--wqflask/wqflask/views.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index b9181368..96f228af 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -65,7 +65,7 @@ from wqflask.comparison_bar_chart import comparison_bar_chart
from wqflask.marker_regression import run_mapping
from wqflask.marker_regression import display_mapping_results
from wqflask.network_graph import network_graph
-from wqflask.correlation import show_corr_results
+from wqflask.correlation.show_corr_results import set_other_template_vars
from wqflask.correlation.correlation_gn3_api import compute_correlation
from wqflask.correlation_matrix import show_corr_matrix
from wqflask.correlation import corr_scatter_plot
@@ -1082,15 +1082,9 @@ def network_graph_page():
@app.route("/corr_compute", methods=('POST',))
def corr_compute_page():
- logger.info("In corr_compute, request.form is:", pf(request.form))
- logger.info(request.url)
- template_vars = show_corr_results.CorrelationResults(request.form)
- return render_template("correlation_page.html", **template_vars.__dict__)
-
- # to test/disable the new correlation api uncomment these lines
-
- # correlation_results = compute_correlation(request.form)
- # return render_template("test_correlation_page.html", correlation_results=correlation_results)
+ correlation_results = compute_correlation(request.form, compute_all=True)
+ correlation_results = set_other_template_vars(request.form, correlation_results)
+ return render_template("correlation_page.html", **correlation_results)
@app.route("/test_corr_compute", methods=["POST"])