From e44f149fb6f6ca7d948c95f30faba4f4c2dc2ddd Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 17 Dec 2020 13:47:16 -0600 Subject: Correlation Min Expr and Location filters display depending upon the selected target dataset now, instead of the trait's dataset --- .../wqflask/static/new/javascript/show_trait.js | 18 ++++++++++++++++ .../show_trait_calculate_correlations.html | 24 ++++++++++++---------- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index 9cd79687..e9c7cce1 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -516,6 +516,24 @@ on_corr_method_change = function() { }; $('select[name=corr_type]').change(on_corr_method_change); +on_dataset_change = function() { + let dataset_type = $('select[name=corr_dataset] option:selected').data('type'); + + if (dataset_type == "mrna_assay"){ + $('#min_expr_filter').show(); + $('#location_filter').show(); + } + else if (dataset_type == "pheno"){ + $('#min_expr_filter').show(); + $('#location_filter').hide(); + } + else { + $('#min_expr_filter').hide(); + $('#location_filter').show(); + } +} +$('select[name=corr_dataset]').change(on_dataset_change); + submit_special = function(url) { get_table_contents_for_form_submit("trait_data_form"); $("#trait_data_form").attr("action", url); diff --git a/wqflask/wqflask/templates/show_trait_calculate_correlations.html b/wqflask/wqflask/templates/show_trait_calculate_correlations.html index ba72ff27..12294efb 100644 --- a/wqflask/wqflask/templates/show_trait_calculate_correlations.html +++ b/wqflask/wqflask/templates/show_trait_calculate_correlations.html @@ -19,18 +19,18 @@ @@ -74,14 +74,16 @@ - {% if dataset.type != "Publish" %} -
+ {% if dataset.type != "Geno" %} +
-
+ {% endif %} + {% if dataset.type != "Pheno" %} +
-- cgit v1.2.3