diff options
-rw-r--r-- | wqflask/base/trait.py | 1 | ||||
-rw-r--r-- | wqflask/wqflask/correlation/rust_correlation.py | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index df561e33..d8a2ec08 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -8,6 +8,7 @@ from base.data_set import create_dataset from utility.authentication_tools import check_resource_availability from utility.tools import GN2_BASE_URL, GN_PROXY_URL from utility.redis_tools import get_redis_conn, get_resource_id +import utility.hmac as hmac from flask import g, request, url_for 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: |