aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-01-03 14:33:59 +0300
committerFrederick Muriuki Muriithi2022-01-28 08:07:27 +0300
commita8c2fbf6188cb3cd632ef0cae10dea122d377739 (patch)
tree1e18818c64b621d703269f615729dd93a9752160
parent8e8d1b5a94f6a544d928ab135c7de4646bfe2d7c (diff)
downloadgenenetwork2-a8c2fbf6188cb3cd632ef0cae10dea122d377739.tar.gz
Fix check for non-existent values
-rw-r--r--wqflask/wqflask/static/new/javascript/partial_correlations.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/wqflask/wqflask/static/new/javascript/partial_correlations.js b/wqflask/wqflask/static/new/javascript/partial_correlations.js
index 1768b4b9..a6121627 100644
--- a/wqflask/wqflask/static/new/javascript/partial_correlations.js
+++ b/wqflask/wqflask/static/new/javascript/partial_correlations.js
@@ -181,28 +181,28 @@ function display_probeset_results(primary, controls, correlations) {
'td[data-column-heading="N"]').innerHTML = item["noverlap"];
new_row.querySelector(
`td[data-column-heading="Sample Partial ${rho_or_r(method)}"]`
- ).innerHTML = format_number(item["partial_corr"]);
+ ).innerHTML = format_number(item["partial_corr"] || NaN);
new_row.querySelector(
`td[data-column-heading="Sample p(partial ${rho_or_r(method)})"]`
- ).innerHTML = format_number(item["partial_corr_p_value"]);
+ ).innerHTML = format_number(item["partial_corr_p_value"] || NaN);
new_row.querySelector(
`td[data-column-heading="Sample ${rho_or_r(method)}"]`
- ).innerHTML = format_number(item["corr"]);
+ ).innerHTML = format_number(item["corr"] || NaN);
new_row.querySelector(
`td[data-column-heading="Sample p(${rho_or_r(method)})"]`
- ).innerHTML = format_number(item["corr_p_value"]);
+ ).innerHTML = format_number(item["corr_p_value"] || NaN);
new_row.querySelector(
`td[data-column-heading="delta ${rho_or_r(method)}"]`
- ).innerHTML = format_number(item["delta"]);
+ ).innerHTML = format_number(item["delta"] || NaN);
new_row.querySelector(
`td[data-column-heading="Lit Corr"]`
- ).innerHTML = format_number(item["l_corr"]);
+ ).innerHTML = format_number(item["l_corr"] || NaN);
new_row.querySelector(
`td[data-column-heading="Tissue ${rho_or_r(method)}"]`
- ).innerHTML = format_number(item["tissue_corr"]);
+ ).innerHTML = format_number(item["tissue_corr"] || NaN);
new_row.querySelector(
`td[data-column-heading="Tissue p(${rho_or_r(method)})"]`
- ).innerHTML = format_number(item["tissue_p_value"]);
+ ).innerHTML = format_number(item["tissue_p_value"] || NaN);
table_body.appendChild(new_row);
});
template_row.setAttribute("display", "none");