aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations/wgcna.py
diff options
context:
space:
mode:
authorAlexander Kabui2021-09-16 10:13:10 +0300
committerAlexander Kabui2021-09-16 10:13:10 +0300
commit3d8f7f069d76cd6ee35b5e9d72d37e38721188d2 (patch)
tree0936d126a1cafad0e01e9aa55b8f1b32fad93666 /gn3/computations/wgcna.py
parent6f9fd1a1866e292ec4b84c214efd61ccb9f5bb58 (diff)
downloadgenenetwork3-3d8f7f069d76cd6ee35b5e9d72d37e38721188d2.tar.gz
run cmd and add exception handler
Diffstat (limited to 'gn3/computations/wgcna.py')
-rw-r--r--gn3/computations/wgcna.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/gn3/computations/wgcna.py b/gn3/computations/wgcna.py
index bcd3a0a..f0f0fa2 100644
--- a/gn3/computations/wgcna.py
+++ b/gn3/computations/wgcna.py
@@ -29,5 +29,9 @@ def compose_wgcna_cmd(rscript_path: str, temp_file_path: str):
def call_wgcna_script(rscript_path: str, request_data: dict):
"""function to call wgcna script"""
generated_file = dump_wgcna_data(request_data)
- cmd = compose_gemma_cmd(rscript_path, generated_file)
- run_cmd(cmd=cmd)
+ cmd = compose_wgcna_cmd(rscript_path, generated_file)
+
+ try:
+ return run_cmd(cmd)
+ except Exception as error:
+ raise error