aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-12-07 14:23:52 -0600
committerzsloan2020-12-07 14:23:52 -0600
commitbf08713e14dad10f7af6637e8cd4e52025e33e3e (patch)
tree433538bfcffcea1c5d6db60091b1b6dfa7c94add /wqflask
parentd0a3db3851bc2895a8775b1dc7c01a92f9c8c85c (diff)
downloadgenenetwork2-bf08713e14dad10f7af6637e8cd4e52025e33e3e.tar.gz
Fixed issue where the correlation scatterplot link wasn't being displayed after the recent correlation table changes
Fixed issue where the Sample p(r/rho) sort wasn't sorting using scientific notation, which resulted in the initial sort being bad
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/templates/correlation_page.html39
1 files changed, 30 insertions, 9 deletions
diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html
index 06ee9056..68566ee5 100644
--- a/wqflask/wqflask/templates/correlation_page.html
+++ b/wqflask/wqflask/templates/correlation_page.html
@@ -345,8 +345,15 @@
'title': "Sample {% if corr_method == 'pearson' %}r{% else %}rho{% endif %}",
'type': "natural-minus-na",
'width': "40px",
- 'data': "sample_r",
- 'orderSequence': [ "desc", "asc"]
+ 'data': null,
+ 'orderSequence': [ "desc", "asc"],
+ 'render': function(data, type, row, meta) {
+ if (data.sample_r != "N/A") {
+ return "<a target\"_blank\" href=\"corr_scatter_plot?dataset_1={% if dataset.name == 'Temp' %}Temp_{{ dataset.group.name }}{% else %}{{ dataset.name }}{% endif %}&dataset_2=" + data.dataset + "&trait_1={{ this_trait.name }}&trait_2=" + data.trait_id + "\">" + data.sample_r + "</a>"
+ } else {
+ return data.sample_r
+ }
+ }
},
{
'title': "N",
@@ -357,7 +364,7 @@
},
{
'title': "Sample p({% if corr_method == 'pearson' %}r{% else %}rho{% endif %})",
- 'type': "natural-minus-na",
+ 'type': "scientific",
'width': "65px",
'data': "sample_p",
'orderSequence': [ "desc", "asc"]
@@ -459,8 +466,15 @@
'title': "Sample {% if corr_method == 'pearson' %}r{% else %}rho{% endif %}",
'type': "natural-minus-na",
'width': "40px",
- 'data': "sample_r",
- 'orderSequence': [ "desc", "asc"]
+ 'data': null,
+ 'orderSequence': [ "desc", "asc"],
+ 'render': function(data, type, row, meta) {
+ if (data.sample_r != "N/A") {
+ return "<a target\"_blank\" href=\"corr_scatter_plot?dataset_1={% if dataset.name == 'Temp' %}Temp_{{ dataset.group.name }}{% else %}{{ dataset.name }}{% endif %}&dataset_2=" + data.dataset + "&trait_1={{ this_trait.name }}&trait_2=" + data.trait_id + "\">" + data.sample_r + "</a>"
+ } else {
+ return data.sample_r
+ }
+ }
},
{
'title': "N",
@@ -471,7 +485,7 @@
},
{
'title': "Sample p({% if corr_method == 'pearson' %}r{% else %}rho{% endif %})",
- 'type': "natural-minus-na",
+ 'type': "scientific",
'width': "65px",
'data': "sample_p",
'orderSequence': [ "desc", "asc"]
@@ -506,8 +520,15 @@
'title': "Sample {% if corr_method == 'pearson' %}r{% else %}rho{% endif %}",
'type': "natural-minus-na",
'width': "40px",
- 'data': "sample_r",
- 'orderSequence': [ "desc", "asc"]
+ 'data': null,
+ 'orderSequence': [ "desc", "asc"],
+ 'render': function(data, type, row, meta) {
+ if (data.sample_r != "N/A") {
+ return "<a target\"_blank\" href=\"corr_scatter_plot?dataset_1={% if dataset.name == 'Temp' %}Temp_{{ dataset.group.name }}{% else %}{{ dataset.name }}{% endif %}&dataset_2=" + data.dataset + "&trait_1={{ this_trait.name }}&trait_2=" + data.trait_id + "\">" + data.sample_r + "</a>"
+ } else {
+ return data.sample_r
+ }
+ }
},
{
'title': "N",
@@ -518,7 +539,7 @@
},
{
'title': "Sample p({% if corr_method == 'pearson' %}r{% else %}rho{% endif %})",
- 'type': "natural-minus-na",
+ 'type': "scientific",
'width': "65px",
'data': "sample_p",
'orderSequence': [ "desc", "asc"]