aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-10-06 17:06:22 +0300
committerFrederick Muriuki Muriithi2022-10-06 17:06:22 +0300
commitf3ac628fd4e9ddb36f48c23186488bcef55f5e48 (patch)
tree60950687d413d79714d0f6a78ad8254591ae4d08 /gn3/computations
parentfe1b8be86b65346724f8f78ab9e5d897e0c480b0 (diff)
downloadgenenetwork3-f3ac628fd4e9ddb36f48c23186488bcef55f5e48.tar.gz
DEBUG: Collect more information on possible failure.
Diffstat (limited to 'gn3/computations')
-rw-r--r--gn3/computations/rust_correlation.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/gn3/computations/rust_correlation.py b/gn3/computations/rust_correlation.py
index 03af997..016f00e 100644
--- a/gn3/computations/rust_correlation.py
+++ b/gn3/computations/rust_correlation.py
@@ -59,7 +59,14 @@ def run_correlation(
tmp_dir=tmp_dir, tmp_file=tmp_file, method=method, delimiter=delimiter,
x_vals=trait_vals)
command_list = [CORRELATION_COMMAND, json_file, TMPDIR]
- subprocess.run(command_list, check=True)
+ try:
+ subprocess.run(command_list, check=True, capture_output=True)
+ except subprocess.CalledProcessError as cpe:
+ actual_command = (
+ os.readlink(CORRELATION_COMMAND)
+ if os.path.islink(CORRELATION_COMMAND)
+ else CORRELATION_COMMAND)
+ raise Exception(command_list, actual_command, cpe.stdout, cpe)
return parse_correlation_output(output_file, corr_type, top_n)