From 585208eca2764e33e70da05875c8e08ccbf91bf1 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 2 Dec 2022 07:29:31 +0300 Subject: correlations: display "--" whenever "lit_corr" is None * wqflask/wqflask/correlation/show_corr_results.py: Check for `None` and display "--" in its place. --- wqflask/wqflask/correlation/show_corr_results.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 95952d33..8b1f557a 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -218,7 +218,9 @@ def populate_table(dataset_metadata, target_dataset, this_dataset, corr_results, results_dict['tissue_pvalue'] = "--" if this_dataset['type'] == "ProbeSet": if 'lit_corr' in trait: - results_dict['lit_corr'] = f"{float(trait['lit_corr']):.3f}" + results_dict['lit_corr'] = ( + f"{float(trait['lit_corr']):.3f}" + if trait["lit_corr"] else "--") if 'tissue_corr' in trait: results_dict['tissue_corr'] = f"{float(trait['tissue_corr']):.3f}" results_dict['tissue_pvalue'] = f"{float(trait['tissue_p_val']):.3e}" -- cgit v1.2.3