aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-01-12 12:25:15 +0300
committerFrederick Muriuki Muriithi2023-01-12 12:25:15 +0300
commite4530da77dfcd2531a26baa66b296b19d25b99b9 (patch)
tree452e39af19d80d988ce4b88dd6b890dfc027cd20 /wqflask
parent4666392bbc34e693f21895ccb62abb816ff95874 (diff)
downloadgenenetwork2-e4530da77dfcd2531a26baa66b296b19d25b99b9.tar.gz
mechanical-rob: use new file(s) for correlation correctness
* test/requests/correlation_results_text_files/BXD_10710_vs_BXDPublish.csv new sample file for testing. * test/requests/correlation_tests.py: update test code to use new sample files * wqflask/wqflask/correlation/show_corr_results.py: Fix minor issues exposed by tests.
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/correlation/show_corr_results.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index 8b1f557a..201c68a3 100644
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -202,8 +202,8 @@ def populate_table(dataset_metadata, target_dataset, this_dataset, corr_results,
results_dict['location'] = target_trait['location']
results_dict['mean'] = "N/A"
results_dict['additive'] = "N/A"
- if target_trait['description']:
- results_dict['description'] = target_trait['description']
+ if target_trait['description'].strip():
+ results_dict['description'] = target_trait['description'].strip()
if target_trait['mean']:
results_dict['mean'] = f"{float(target_trait['mean']):.3f}"
try:
@@ -236,8 +236,8 @@ def populate_table(dataset_metadata, target_dataset, this_dataset, corr_results,
if target_trait["abbreviation"]:
results_dict['abbreviation'] = target_trait['abbreviation']
- if target_trait["description"] == target_trait['description']:
- results_dict['description'] = target_trait['description']
+ if target_trait["description"].strip():
+ results_dict['description'] = target_trait['description'].strip()
if target_trait["mean"]:
results_dict['mean'] = f"{float(target_trait['mean']):.3f}"