aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-08-25 18:02:31 +0000
committerzsloan2021-08-25 18:02:31 +0000
commit582893c0cc87f87e5dfc7fe0209b2e4a3f85d4a4 (patch)
tree23736f253bff92526e1d67b4872db89549743ba4
parent3327c9dc95d2c4d295dc8dbf4839c01294b53ada (diff)
downloadgenenetwork2-582893c0cc87f87e5dfc7fe0209b2e4a3f85d4a4.tar.gz
Fixed issue in get_diff_of_vals that caused the diff to be calculated wrong (due to one set of values being rounded to 3 digits and the other not
-rw-r--r--wqflask/wqflask/show_trait/show_trait.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index 80f5d117..3f93bae0 100644
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -830,11 +830,11 @@ def get_diff_of_vals(new_vals: Dict, trait_id: str) -> Dict:
diff_dict = {}
for sample in shared_samples:
try:
- new_val = float(new_vals[sample])
+ new_val = round(float(new_vals[sample]), 3)
except:
new_val = "x"
try:
- old_val = float(old_vals[sample])
+ old_val = round(float(old_vals[sample]), 3)
except:
old_val = "x"