aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-12-17 13:47:16 -0600
committerzsloan2020-12-17 13:47:16 -0600
commite44f149fb6f6ca7d948c95f30faba4f4c2dc2ddd (patch)
tree6e59bc0d351712f3ab51a3bb4d1e70cca5ea6eb6 /wqflask
parentfbec8e8bb919cb866d70db9f93a942f4554395fb (diff)
downloadgenenetwork2-e44f149fb6f6ca7d948c95f30faba4f4c2dc2ddd.tar.gz
Correlation Min Expr and Location filters display depending upon the selected target dataset now, instead of the trait's dataset
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait.js18
-rw-r--r--wqflask/wqflask/templates/show_trait_calculate_correlations.html24
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 @@
<select name="corr_dataset" class="form-control">
{% for tissue in corr_tools.dataset_menu %}
{% if tissue.tissue %}
- <optgroup label="{{ tissue.tissue }} ------">
+ <optgroup label="{{ tissue.tissue }} ------">
{% endif %}
{% for dataset in tissue.datasets %}
- <option value="{{ dataset[1] }}"
- {% if corr_tools.dataset_menu_selected == dataset[1] %}
- selected
- {% endif %}>
- {{ dataset[0] }}
- </option>
+ <option data-type="{% if tissue.tissue %}mrna_assay{% elif dataset[1][-4:] == 'Geno' %}geno{% else %}pheno{% endif %}" value="{{ dataset[1] }}"
+ {% if corr_tools.dataset_menu_selected == dataset[1] %}
+ selected
+ {% endif %}>
+ {{ dataset[0] }}
+ </option>
{% endfor %}
{% if tissue.tissue %}
- </optgroup>
+ </optgroup>
{% endif %}
{% endfor %}
</select>
@@ -74,14 +74,16 @@
</select>
</div>
</div>
- {% if dataset.type != "Publish" %}
- <div class="form-group">
+ {% if dataset.type != "Geno" %}
+ <div id="min_expr_filter" class="form-group">
<label class="col-xs-2 control-label">Min Expr</label>
<div class="col-xs-4 controls">
<input name="min_expr" value="" type="text" class="form-control min-expr-field">
</div>
</div>
- <div class="form-group">
+ {% endif %}
+ {% if dataset.type != "Pheno" %}
+ <div id="location_filter" class="form-group">
<label class="col-xs-2 control-label">Location</label>
<div class="col-xs-6 controls">
<span>