aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/correlation/show_corr_results.py13
-rw-r--r--wqflask/wqflask/search_results.py18
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait.js36
-rw-r--r--wqflask/wqflask/templates/collections/view.html36
-rw-r--r--wqflask/wqflask/templates/correlation_page.html51
-rw-r--r--wqflask/wqflask/templates/search_result_page.html55
-rw-r--r--wqflask/wqflask/templates/show_trait_transform_and_filter.html2
-rw-r--r--wqflask/wqflask/templates/tool_buttons.html35
8 files changed, 103 insertions, 143 deletions
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index 0c1cea0e..8536ce51 100644
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -493,14 +493,15 @@ def generate_corr_json(corr_results, this_trait, dataset, target_dataset, for_ap
results_dict['description'] = "N/A"
results_dict['location'] = trait.location_repr
results_dict['mean'] = "N/A"
- results_dict['lrs_score'] = "N/A"
results_dict['additive'] = "N/A"
if bool(trait.description_display):
results_dict['description'] = trait.description_display
if bool(trait.mean):
results_dict['mean'] = f"{float(trait.mean):.3f}"
- if trait.LRS_score_repr != "N/A":
- results_dict['lrs_score'] = f"{float(trait.LRS_score_repr):.1f}"
+ try:
+ trait_dict['lod_score'] = f"{float(this_trait.LRS_score_repr) / 4.61:.1f}"
+ except:
+ trait_dict['lod_score'] = "N/A"
results_dict['lrs_location'] = trait.LRS_location_repr
if bool(trait.additive):
results_dict['additive'] = f"{float(trait.additive):.3f}"
@@ -544,8 +545,10 @@ def generate_corr_json(corr_results, this_trait, dataset, target_dataset, for_ap
else:
results_dict['pubmed_link'] = trait.pubmed_link
results_dict['pubmed_text'] = trait.pubmed_text
-
- results_dict['lrs_score'] = trait.LRS_score_repr
+ try:
+ trait_dict['lod_score'] = f"{float(this_trait.LRS_score_repr) / 4.61:.1f}"
+ except:
+ trait_dict['lod_score'] = "N/A"
results_dict['lrs_location'] = trait.LRS_location_repr
if bool(trait.additive):
results_dict['additive'] = f"{float(trait.additive):.3f}"
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index ce836ce2..0d0894a4 100644
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -126,11 +126,14 @@ views.py).
trait_dict['mean'] = "N/A"
trait_dict['additive'] = "N/A"
if this_trait.mean != "" and this_trait.mean != None:
- trait_dict['mean'] = '%.3f' % this_trait.mean
- trait_dict['lrs_score'] = this_trait.LRS_score_repr
+ trait_dict['mean'] = f"{this_trait.mean:.3f}"
+ try:
+ trait_dict['lod_score'] = f"{float(this_trait.LRS_score_repr) / 4.61:.1f}"
+ except:
+ trait_dict['lod_score'] = "N/A"
trait_dict['lrs_location'] = this_trait.LRS_location_repr
if this_trait.additive != "":
- trait_dict['additive'] = '%.3f' % this_trait.additive
+ trait_dict['additive'] = f"{this_trait.additive:.3f}"
elif this_trait.dataset.type == "Geno":
trait_dict['location'] = this_trait.location_repr
elif this_trait.dataset.type == "Publish":
@@ -143,12 +146,15 @@ views.py).
trait_dict['pubmed_text'] = this_trait.pubmed_text
trait_dict['mean'] = "N/A"
if this_trait.mean != "" and this_trait.mean != None:
- trait_dict['mean'] = '%.3f' % this_trait.mean
- trait_dict['lrs_score'] = this_trait.LRS_score_repr
+ trait_dict['mean'] = f"{this_trait.mean:.3f}"
+ try:
+ trait_dict['lod_score'] = f"{float(this_trait.LRS_score_repr) / 4.61:.1f}"
+ except:
+ trait_dict['lod_score'] = "N/A"
trait_dict['lrs_location'] = this_trait.LRS_location_repr
trait_dict['additive'] = "N/A"
if this_trait.additive != "":
- trait_dict['additive'] = '%.3f' % this_trait.additive
+ trait_dict['additive'] = f"{this_trait.additive:.3f}"
# Convert any bytes in dict to a normal utf-8 string
for key in trait_dict.keys():
if isinstance(trait_dict[key], bytes):
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js
index 87c35984..5dc9e456 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait.js
@@ -731,14 +731,36 @@ filter_by_value = function() {
}
};
+hide_no_value_filter = function( settings, data, dataIndex ) {
+ this_value = table_api.column(3).nodes().to$()[dataIndex].childNodes[0].value;
+ if (this_value == "x"){
+ return false
+ } else {
+ return true
+ }
+}
+
hide_no_value = function() {
- return $('.value_se').each((function(_this) {
- return function(_index, element) {
- if ($(element).find('.trait-value-input').val() === 'x') {
- return $(element).hide();
+ tables = ['samples_primary', 'samples_other'];
+ filter_active = $(this).data("active");
+ for (_i = 0, _len = tables.length; _i < _len; _i++) {
+ table = tables[_i];
+ if ($('#' + table).length) {
+ table_api = $('#' + table).DataTable();
+ if (filter_active == "true"){
+ $(this).val("Hide No Value")
+ table_api.draw();
+ $(this).data("active", "false");
+ } else {
+ $(this).val("Show No Value")
+ $.fn.dataTable.ext.search.push(hide_no_value_filter);
+ table_api.search();
+ table_api.draw();
+ $.fn.dataTable.ext.search.splice($.fn.dataTable.ext.search.indexOf(hide_no_value_filter, 1));
+ $(this).data("active", "true");
}
- };
- })(this));
+ }
+ }
};
$('#hide_no_value').click(hide_no_value);
@@ -754,6 +776,7 @@ $('#block_outliers').click(block_outliers);
reset_samples_table = function() {
$('input[name="transform"]').val("");
$('span[name="transform_text"]').text("")
+ $('#hide_no_value').val("Hide No Value")
tables = ['samples_primary', 'samples_other'];
for (_i = 0, _len = tables.length; _i < _len; _i++) {
table = tables[_i];
@@ -771,6 +794,7 @@ reset_samples_table = function() {
this_node.value = this_node.attributes["data-value"].value;
}
}
+ table_api.draw();
}
}
};
diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html
index 99a6f2de..66945ed7 100644
--- a/wqflask/wqflask/templates/collections/view.html
+++ b/wqflask/wqflask/templates/collections/view.html
@@ -28,41 +28,7 @@
{{ this_trait.name }}:{{ this_trait.dataset.name }}:{{ data_hmac('{}:{}'.format(this_trait.name, this_trait.dataset.name)) }},
{% endfor %}" >
- <button id="corr_matrix" class="btn btn-primary submit_special" data-url="/corr_matrix" title="Correlation Matrix" >
- Correlations
- </button>
-
- <button id="network_graph" class="btn btn-primary submit_special" data-url="/network_graph" title="Network Graph" >
- Networks
- </button>
-
- <button id="send_to_webgestalt" class="btn btn-primary submit_special" data-url="/webgestalt_page" title="WebGestalt" >
- WebGestalt
- </button>
-
- <button id="send_to_geneweaver" class="btn btn-primary submit_special" data-url="/geneweaver_page" title="GeneWeaver" >
- GeneWeaver
- </button>
-
- <button id="send_to_bnw" class="btn btn-primary submit_special" data-url="/bnw_page" title="Bayesian network software for causal modeling and reasoning, with an intuitive interface to incorporate biological knowledge and a complete pipeline from data to model to prediction" >
- BNW
- </button>
-
- <button id="wgcna_setup" class="btn btn-primary submit_special" data-url="/wgcna_setup" title="WGCNA Analysis" >
- WGCNA
- </button>
-
- <button id="ctl_setup" class="btn btn-primary submit_special" data-url="/ctl_setup" title="CTL Analysis" >
- CTL Maps
- </button>
-
- <button id="heatmap" class="btn btn-primary submit_special" data-url="/heatmap" title="Heatmap" >
- MultiMap
- </button>
-
- <button id="comp_bar_chart" class="btn btn-primary submit_special" data-url="/comparison_bar_chart" title="Comparison Bar Chart" >
- Comparison Bar Chart
- </button>
+ {% include 'tool_buttons.html' %}
</form>
</div>
diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html
index f6684ad7..8e2a23fd 100644
--- a/wqflask/wqflask/templates/correlation_page.html
+++ b/wqflask/wqflask/templates/correlation_page.html
@@ -32,42 +32,7 @@
{% for this_trait in trait_list %}
{{ this_trait.name }}:{{ this_trait.dataset }},
{% endfor %}" >
-
- <button id="corr_matrix" class="btn btn-primary submit_special" data-url="/corr_matrix" title="Correlation Matrix" >
- Correlations
- </button>
-
- <button id="network_graph" class="btn btn-primary submit_special" data-url="/network_graph" title="Network Graph" >
- Networks
- </button>
-
- <button id="send_to_webgestalt" class="btn btn-primary submit_special" data-url="/webgestalt_page" title="WebGestalt" >
- WebGestalt
- </button>
-
- <button id="send_to_geneweaver" class="btn btn-primary submit_special" data-url="/geneweaver_page" title="GeneWeaver" >
- GeneWeaver
- </button>
-
- <button id="send_to_bnw" class="btn btn-primary submit_special" data-url="/bnw_page" title="Bayesian network software for causal modeling and reasoning, with an intuitive interface to incorporate biological knowledge and a complete pipeline from data to model to prediction" >
- </button>
-
- <button id="wgcna_setup" class="btn btn-primary submit_special" data-url="/wgcna_setup" title="WGCNA Analysis" >
- WGCNA
- </button>
-
- <button id="ctl_setup" class="btn btn-primary submit_special" data-url="/ctl_setup" title="CTL Analysis" >
- CTL Maps
- </button>
-
- <button id="heatmap" class="btn btn-primary submit_special" data-url="/heatmap" title="Heatmap" >
- MultiMap
- </button>
-
- <button id="comp_bar_chart" class="btn btn-primary submit_special" data-url="/comparison_bar_chart" title="Comparison Bar Chart" >
- Comparison Bar Chart
- </button>
-
+ {% include 'tool_buttons.html' %}
</form>
</div>
<br />
@@ -119,14 +84,12 @@
<div class="show-hide-container" style="float: left; clear: left;">
<b>Show/Hide Columns:</b>
<br>
- <button class="toggle-vis" data-column="1">Index</button>
- <button class="toggle-vis" data-column="2">Record</button>
{% if target_dataset.type == 'ProbeSet' %}
<button class="toggle-vis" data-column="3">Symbol</button>
<button class="toggle-vis" data-column="4">Description</button>
<button class="toggle-vis" data-column="5">Location</button>
<button class="toggle-vis" data-column="6">Mean</button>
- <button class="toggle-vis" data-column="7">High P</button>
+ <button class="toggle-vis" data-column="7">Peak LOD</button>
<button class="toggle-vis" data-column="8">Peak Location</button>
<button class="toggle-vis" data-column="9">Effect Size</button>
{% elif target_dataset.type == 'Publish' %}
@@ -137,7 +100,7 @@
<button class="toggle-vis" data-column="7">Sample {% if corr_method == 'pearson' %}r{% else %}rho{% endif %}</button>
<button class="toggle-vis" data-column="8">N</button>
<button class="toggle-vis" data-column="9">Sample p({% if corr_method == 'pearson' %}r{% else %}rho{% endif %})</button>
- <button class="toggle-vis" data-column="10">High P</button>
+ <button class="toggle-vis" data-column="10">Peak LOD</button>
<button class="toggle-vis" data-column="11">Peak Location</button>
<button class="toggle-vis" data-column="12">Effect Size</button>
{% else %}
@@ -391,9 +354,9 @@
'orderSequence': [ "desc", "asc"]
},
{
- 'title': "High P<a href=\"http://gn1.genenetwork.org/glossary.html#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>",
+ 'title': "Peak <a href=\"{{ url_for('glossary_blueprint.glossary') }}#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>LOD",
'type': "natural-minus-na",
- 'data': "lrs_score",
+ 'data': "lod_score",
'width': "60px",
'orderSequence': [ "desc", "asc"]
},
@@ -491,9 +454,9 @@
'orderSequence': [ "desc", "asc"]
},
{
- 'title': "High P<a href=\"http://gn1.genenetwork.org/glossary.html#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>",
+ 'title': "Peak <a href=\"{{ url_for('glossary_blueprint.glossary') }}#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>LOD",
'type': "natural-minus-na",
- 'data': "lrs_score",
+ 'data': "lod_score",
'width': "60px",
'orderSequence': [ "desc", "asc"]
},
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index 3be2e395..f2334512 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -75,42 +75,7 @@
{{ this_trait.name }}:{{ this_trait.dataset }},
{% endfor %}" >
-
- <button id="corr_matrix" class="btn btn-primary submit_special" data-url="/corr_matrix" title="Correlation Matrix" >
- Correlations
- </button>
-
- <button id="network_graph" class="btn btn-primary submit_special" data-url="/network_graph" title="Network Graph" >
- Networks
- </button>
-
- <button id="send_to_webgestalt" class="btn btn-primary submit_special" data-url="/webgestalt_page" title="WebGestalt" >
- WebGestalt
- </button>
-
- <button id="send_to_geneweaver" class="btn btn-primary submit_special" data-url="/geneweaver_page" title="GeneWeaver" >
- GeneWeaver
- </button>
-
- <button id="send_to_bnw" class="btn btn-primary submit_special" data-url="/bnw_page" title="Bayesian network software for causal modeling and reasoning, with an intuitive interface to incorporate biological knowledge and a complete pipeline from data to model to prediction" >
- BNW
- </button>
-
- <button id="wgcna_setup" class="btn btn-primary submit_special" data-url="/wgcna_setup" title="WGCNA Analysis" >
- WGCNA
- </button>
-
- <button id="ctl_setup" class="btn btn-primary submit_special" data-url="/ctl_setup" title="CTL Analysis" >
- CTL Maps
- </button>
-
- <button id="heatmap" class="btn btn-primary submit_special" data-url="/heatmap" title="Heatmap" >
- MultiMap
- </button>
-
- <button id="comp_bar_chart" class="btn btn-primary submit_special" data-url="/comparison_bar_chart" title="Comparison Bar Chart" >
- Comparison Bar Chart
- </button>
+ {% include 'tool_buttons.html' %}
</form>
</div>
@@ -141,14 +106,12 @@
<div class="show-hide-container">
<b>Show/Hide Columns:</b>
<br>
- <button class="toggle-vis" data-column="1">Index</button>
- <button class="toggle-vis" data-column="2">Record</button>
{% if dataset.type == 'ProbeSet' %}
<button class="toggle-vis" data-column="3">Symbol</button>
<button class="toggle-vis" data-column="4">Description</button>
<button class="toggle-vis" data-column="5">Location</button>
<button class="toggle-vis" data-column="6">Mean</button>
- <button class="toggle-vis" data-column="7">High P</button>
+ <button class="toggle-vis" data-column="7">Peak LOD</button>
<button class="toggle-vis" data-column="8">Peak Location</button>
<button class="toggle-vis" data-column="9">Effect Size</button>
{% elif dataset.type == 'Publish' %}
@@ -156,7 +119,7 @@
<button class="toggle-vis" data-column="4">Mean</button>
<button class="toggle-vis" data-column="5">Authors</button>
<button class="toggle-vis" data-column="6">Year</button>
- <button class="toggle-vis" data-column="7">High P</button>
+ <button class="toggle-vis" data-column="7">Peak LOD</button>
<button class="toggle-vis" data-column="8">Peak Location</button>
<button class="toggle-vis" data-column="9">Effect Size</button>
{% endif %}
@@ -314,10 +277,10 @@
'orderSequence': [ "desc", "asc"]
},
{
- 'title': "High P<a href=\"{{ url_for('glossary_blueprint.glossary') }}#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>",
+ 'title': "Peak <a href=\"{{ url_for('glossary_blueprint.glossary') }}#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>LOD",
'type': "natural-minus-na",
- 'data': "lrs_score",
- 'width': "65px",
+ 'data': "lod_score",
+ 'width': "60px",
'orderSequence': [ "desc", "asc"]
},
{
@@ -383,10 +346,10 @@
'orderSequence': [ "desc", "asc"]
},
{
- 'title': "High P<a href=\"{{ url_for('glossary_blueprint.glossary') }}#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>",
+ 'title': "Peak <a href=\"{{ url_for('glossary_blueprint.glossary') }}#LRS\" target=\"_blank\" style=\"color: white;\">&nbsp;<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></a>LOD",
'type': "natural-minus-na",
- 'data': "lrs_score",
- 'width': "80px",
+ 'data': "lod_score",
+ 'width': "60px",
'orderSequence': [ "desc", "asc"]
},
{
diff --git a/wqflask/wqflask/templates/show_trait_transform_and_filter.html b/wqflask/wqflask/templates/show_trait_transform_and_filter.html
index d7eac378..b70ca590 100644
--- a/wqflask/wqflask/templates/show_trait_transform_and_filter.html
+++ b/wqflask/wqflask/templates/show_trait_transform_and_filter.html
@@ -80,7 +80,7 @@
<input type="button" id="filter_by_value" class="btn btn-danger" value="Filter">
</div>
<div>
- <input type="button" id="hide_no_value" class="btn btn-default" value="Hide No Value">
+ <input data-active="false" type="button" id="hide_no_value" class="btn btn-default" value="Hide No Value">
<input type="button" id="block_outliers" class="btn btn-default" value="Block Outliers">
<input type="button" class="btn btn-success reset" value="Reset">
<span class="input-append">
diff --git a/wqflask/wqflask/templates/tool_buttons.html b/wqflask/wqflask/templates/tool_buttons.html
new file mode 100644
index 00000000..5b2dbf3d
--- /dev/null
+++ b/wqflask/wqflask/templates/tool_buttons.html
@@ -0,0 +1,35 @@
+<button id="corr_matrix" class="btn btn-primary submit_special" data-url="/corr_matrix" title="Correlation Matrix" >
+ Correlations
+</button>
+
+<button id="network_graph" class="btn btn-primary submit_special" data-url="/network_graph" title="Network Graph" >
+ Networks
+</button>
+
+<button id="send_to_webgestalt" class="btn btn-primary submit_special" data-url="/webgestalt_page" title="WebGestalt" >
+ WebGestalt
+</button>
+
+<button id="send_to_geneweaver" class="btn btn-primary submit_special" data-url="/geneweaver_page" title="GeneWeaver" >
+ GeneWeaver
+</button>
+
+<button id="send_to_bnw" class="btn btn-primary submit_special" data-url="/bnw_page" title="Bayesian network software for causal modeling and reasoning, with an intuitive interface to incorporate biological knowledge and a complete pipeline from data to model to prediction" >
+ BNW
+</button>
+
+<button id="wgcna_setup" class="btn btn-primary submit_special" data-url="/wgcna_setup" title="WGCNA Analysis" >
+ WGCNA
+</button>
+
+<button id="ctl_setup" class="btn btn-primary submit_special" data-url="/ctl_setup" title="CTL Analysis" >
+ CTL Maps
+</button>
+
+<button id="heatmap" class="btn btn-primary submit_special" data-url="/heatmap" title="Heatmap" >
+ MultiMap
+</button>
+
+<button id="comp_bar_chart" class="btn btn-primary submit_special" data-url="/comparison_bar_chart" title="Comparison Bar Chart" >
+ Comparison Bar Chart
+</button> \ No newline at end of file