diff options
author | Frederick Muriuki Muriithi | 2022-12-02 07:29:31 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-12-02 07:29:31 +0300 |
commit | 585208eca2764e33e70da05875c8e08ccbf91bf1 (patch) | |
tree | 559773fb3536b5bff41925752e0973c5e0bb34c2 /wqflask | |
parent | c02d027dbd6476d375821e7dcbe3a719252ca092 (diff) | |
download | genenetwork2-585208eca2764e33e70da05875c8e08ccbf91bf1.tar.gz |
correlations: display "--" whenever "lit_corr" is None
* wqflask/wqflask/correlation/show_corr_results.py: Check for `None`
and display "--" in its place.
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/correlation/show_corr_results.py | 4 |
1 files changed, 3 insertions, 1 deletions
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}" |