diff options
author | Frederick Muriuki Muriithi | 2022-09-12 07:11:33 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-09-12 07:11:33 +0300 |
commit | df7ae4856b2191c449d96eac42ce23d3f830073d (patch) | |
tree | 3af09c0fd7c9ee3d10540b8b7913774a721f6ccd /wqflask | |
parent | 9a3df65704c73a325eb13abcdb184c8485736820 (diff) | |
download | genenetwork2-df7ae4856b2191c449d96eac42ce23d3f830073d.tar.gz |
Check for traits before computing
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/correlation/rust_correlation.py | 3 |
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 |