aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations
diff options
context:
space:
mode:
authorAlexander Kabui2021-06-23 10:18:54 +0300
committerAlexander Kabui2021-06-23 10:18:54 +0300
commitfed7009b5eec9cc8b9370d4fb8486c7e4136b3d4 (patch)
tree6e1decbe45fe98d212ab976a57cbba246c8a54a3 /gn3/computations
parent3cc3cf68c2dcbdc2cd496f8e2728a59fbb6614e6 (diff)
downloadgenenetwork3-fed7009b5eec9cc8b9370d4fb8486c7e4136b3d4.tar.gz
minor fixes for biweight script
Diffstat (limited to 'gn3/computations')
-rw-r--r--gn3/computations/biweight.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/gn3/computations/biweight.py b/gn3/computations/biweight.py
index 6d031ad..0377bdf 100644
--- a/gn3/computations/biweight.py
+++ b/gn3/computations/biweight.py
@@ -19,7 +19,9 @@ def calculate_biweight_corr(trait_vals: List,
cmd = [command, path_to_script] + [args_1] + [args_2]
results = subprocess.check_output(cmd, universal_newlines=True)
-
- (corr_coeff, p_val) = tuple([float(y) for y in results.split()])
-
- return (corr_coeff, p_val)
+ try:
+ (corr_coeff, p_val) = tuple(
+ [float(y.strip()) for y in results.split()])
+ return (corr_coeff, p_val)
+ except Exception as e:
+ raise e