From a8c2fbf6188cb3cd632ef0cae10dea122d377739 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 3 Jan 2022 14:33:59 +0300 Subject: Fix check for non-existent values --- .../static/new/javascript/partial_correlations.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'wqflask') 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"); -- cgit v1.2.3