diff options
author | Frederick Muriuki Muriithi | 2022-08-12 13:48:44 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-08-12 13:48:44 +0300 |
commit | 30ec1cec4c2ddf878131dbc48b36373a93cb8148 (patch) | |
tree | bb63c0cb874691a633eb8f3d6a1bdee6c85ee75d | |
parent | ea0b698283443e7ccdb23efbef828effd0086bb9 (diff) | |
download | genenetwork2-30ec1cec4c2ddf878131dbc48b36373a93cb8148.tar.gz |
Revert "Check for keys before using them."
This reverts commit a1cbc12f843bbdc1759d5acac5ae3630fb5d4b81.
-rw-r--r-- | wqflask/wqflask/correlation/show_corr_results.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 988910c3..1c391386 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -121,12 +121,9 @@ def correlation_json_for_table(correlation_data, this_trait, this_dataset, targe results_dict['dataset'] = target_dataset['name'] results_dict['hmac'] = hmac.data_hmac( '{}:{}'.format(target_trait['name'], target_dataset['name'])) - if "corr_coefficient" in trait: - results_dict['sample_r'] = f"{float(trait['corr_coefficient']):.3f}" - if "num_overlap" in trait: - results_dict['num_overlap'] = trait['num_overlap'] - if "p_value" in trait: - results_dict['sample_p'] = f"{float(trait['p_value']):.3e}" + results_dict['sample_r'] = f"{float(trait['corr_coefficient']):.3f}" + results_dict['num_overlap'] = trait['num_overlap'] + results_dict['sample_p'] = f"{float(trait['p_value']):.3e}" if target_dataset['type'] == "ProbeSet": results_dict['symbol'] = target_trait['symbol'] results_dict['description'] = "N/A" |