aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-09-12 07:28:24 +0300
committerFrederick Muriuki Muriithi2022-09-12 07:28:24 +0300
commita0ce616c7daae7b476f07b8c069a526f92dbf79a (patch)
tree566733cab0c6e274a46e280986d2926ce5d5e40b
parent3a692bf277f0176b1ceb95c60b5ec688219e1058 (diff)
downloadgenenetwork2-a0ce616c7daae7b476f07b8c069a526f92dbf79a.tar.gz
Check there is target data before running correlations
-rw-r--r--wqflask/wqflask/correlation/rust_correlation.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/wqflask/wqflask/correlation/rust_correlation.py b/wqflask/wqflask/correlation/rust_correlation.py
index 8e8cd463..5b39c871 100644
--- a/wqflask/wqflask/correlation/rust_correlation.py
+++ b/wqflask/wqflask/correlation/rust_correlation.py
@@ -247,6 +247,9 @@ def __compute_sample_corr__(
r = ",".join(lts)
target_data.append(r)
+ if len(target_data) == 0:
+ return {}
+
return run_correlation(
target_data, list(sample_data.values()), method, ",", corr_type,
n_top)