diff options
author | Frederick Muriuki Muriithi | 2022-09-12 07:28:24 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-09-12 07:28:24 +0300 |
commit | a0ce616c7daae7b476f07b8c069a526f92dbf79a (patch) | |
tree | 566733cab0c6e274a46e280986d2926ce5d5e40b /wqflask | |
parent | 3a692bf277f0176b1ceb95c60b5ec688219e1058 (diff) | |
download | genenetwork2-a0ce616c7daae7b476f07b8c069a526f92dbf79a.tar.gz |
Check there is target data before running correlations
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 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) |