From a2796900a34056cfba2dfa4c995764ea60ff8e45 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 12 Dec 2022 21:20:41 +0000 Subject: Change logic in compute_correlation_rust so that it doesn't re-run the top 500 correlations for sample correlations of non-probeset traits (which it was previously doing and caused many wrong results --- wqflask/wqflask/correlation/rust_correlation.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/wqflask/wqflask/correlation/rust_correlation.py b/wqflask/wqflask/correlation/rust_correlation.py index f1294dfb..5ae5e89c 100644 --- a/wqflask/wqflask/correlation/rust_correlation.py +++ b/wqflask/wqflask/correlation/rust_correlation.py @@ -361,12 +361,14 @@ def compute_correlation_rust( if should_compute_all: - if corr_type == "sample" and this_dataset.type == "ProbeSet": - - top_a = compute_top_n_tissue( - target_dataset, this_trait, results, method) - - top_b = compute_top_n_lit(results, target_dataset, this_trait) + if corr_type == "sample": + if this_dataset.type == "ProbeSet": + top_a = compute_top_n_tissue( + target_dataset, this_trait, results, method) + + top_b = compute_top_n_lit(results, target_dataset, this_trait) + else: + pass elif corr_type == "lit": -- cgit v1.2.3