aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-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 214a47e7..debc4930 100644
--- a/wqflask/wqflask/correlation/rust_correlation.py
+++ b/wqflask/wqflask/correlation/rust_correlation.py
@@ -131,6 +131,9 @@ def compute_top_n_sample(start_vars, dataset, trait_list):
(sample_data, sample_ids) = __fetch_sample_ids__(
start_vars["sample_vals"], start_vars["corr_samples_group"])
+ if len(trait_list) == 0:
+ return {}
+
with database_connector() as conn:
with conn.cursor() as curr:
# fetching strain data in bulk