aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/correlation/rust_correlation.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/wqflask/wqflask/correlation/rust_correlation.py b/wqflask/wqflask/correlation/rust_correlation.py
index 775f4ee9..ef3988e5 100644
--- a/wqflask/wqflask/correlation/rust_correlation.py
+++ b/wqflask/wqflask/correlation/rust_correlation.py
@@ -20,6 +20,9 @@ from gn3.db_utils import database_connector
def query_probes_metadata(dataset, trait_list):
"""query traits metadata in bulk for probeset"""
+ if not bool(trait_list):
+ return []
+
with database_connector() as conn:
with conn.cursor() as cursor:
@@ -221,6 +224,8 @@ def __compute_sample_corr__(
sample_data = get_sample_corr_data(
sample_type=start_vars["corr_samples_group"], all_samples=all_samples,
dataset_samples=this_dataset.group.all_samples_ordered())
+ if not bool(sample_data):
+ return {}
if target_dataset.type == "ProbeSet":
with database_connector() as conn: