From 8a6c81c8963f72958aa36a488e707669af7c7713 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 17 Oct 2022 19:38:57 +0000 Subject: Fix correlation filter logic --- wqflask/wqflask/correlation/show_corr_results.py | 31 ++++++++++++------------ 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 2d559fbd..a1b45ff6 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -128,21 +128,22 @@ def correlation_json_for_table(start_vars, correlation_data, this_trait, this_da if (min_expr != None) and (float(target_trait['mean']) < min_expr): continue - if target_dataset['type'] == "ProbeSet" or target_dataset['type'] == "Geno": - if start_vars['location_type'] == "gene": - if location_chr != None and (target_trait['chr'] != location_chr): - continue - if (min_location_mb != None) and (float(target_trait['mb']) < float(min_location_mb)): - continue - if (max_location_mb != None) and (float(target_trait['mb']) > float(max_location_mb)): - continue - else: - if location_chr != None and (target_trait['lrs_chr'] != location_chr): - continue - if (min_location_mb != None) and (float(target_trait['lrs_mb']) < float(min_location_mb)): - continue - if (max_location_mb != None) and (float(target_trait['lrs_mb']) > float(max_location_mb)): - continue + if start_vars['location_type'] == "gene" and (target_dataset['type'] == "ProbeSet" or target_dataset['type'] == "Geno"): + if location_chr != None and (target_trait['chr'] != location_chr): + continue + if (min_location_mb != None) and (float(target_trait['mb']) < float(min_location_mb)): + continue + if (max_location_mb != None) and (float(target_trait['mb']) > float(max_location_mb)): + continue + elif target_dataset['type'] == "ProbeSet" or target_dataset['type'] == "Publish": + if location_chr != None and (target_trait['lrs_chr'] != location_chr): + continue + if (min_location_mb != None) and (float(target_trait['lrs_mb']) < float(min_location_mb)): + continue + if (max_location_mb != None) and (float(target_trait['lrs_mb']) > float(max_location_mb)): + continue + else: + continue else: continue -- cgit v1.2.3