aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
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"]