aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-01-03 14:33:59 +0300
committerzsloan2022-01-29 00:42:44 -0600
commit023c64766bf08e8884c64cf53c6f3664276d2d76 (patch)
tree1a0c29be37bb330ec6024fd999859328930116ee
parentb054be4025c74cb574ed035ac99a15ccf010005d (diff)
downloadgenenetwork2-023c64766bf08e8884c64cf53c6f3664276d2d76.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");