From d723eb260bfd9c707f6e282037c4e42670bdf48e Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 16 Jun 2021 21:15:27 +0000 Subject: 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) --- wqflask/wqflask/views.py | 14 ++++---------- 1 file 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"]) -- cgit v1.2.3 From c327905af1ef1a0c66a453127ee8f5ba4a824573 Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 16 Jun 2021 21:16:09 +0000 Subject: Changed correlation page template to account for differences in the output returned from the GN3 API correlation code --- wqflask/wqflask/templates/correlation_page.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html index 4cad2749..f66eb4bd 100644 --- a/wqflask/wqflask/templates/correlation_page.html +++ b/wqflask/wqflask/templates/correlation_page.html @@ -17,9 +17,9 @@
-

Values of record {{ this_trait.name }} in the {{ dataset.fullname }} +

Values of record {{ this_trait.name }} in the {{ this_dataset.fullname }} dataset were compared to all records in the {{ target_dataset.fullname }} - dataset. The top {{ return_number }} correlations ranked by the {{ formatted_corr_type }} are displayed. + dataset. The top {{ return_results }} correlations ranked by the {{ formatted_corr_type }} are displayed. You can resort this list by clicking the headers. Select the Record ID to open the trait data and analysis page.

@@ -30,7 +30,7 @@ {% include 'tool_buttons.html' %} @@ -43,7 +43,7 @@ - + @@ -146,7 +146,7 @@