From ce7b13ab045a2e0444bd786965e30b584038a394 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 5 Aug 2024 17:49:06 +0000 Subject: Move check for target_trait mb/chr into the if statement for ProbeSet/Geno datasets Previously it would throw an error for Publish datasets, since they don't have a location --- gn2/wqflask/correlation/show_corr_results.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gn2/wqflask/correlation/show_corr_results.py b/gn2/wqflask/correlation/show_corr_results.py index be48abc2..1abf1a28 100644 --- a/gn2/wqflask/correlation/show_corr_results.py +++ b/gn2/wqflask/correlation/show_corr_results.py @@ -90,10 +90,9 @@ def apply_filters(trait, target_trait, target_dataset, **filters): def __location_filter__(location_type, location_chr, min_location_mb, max_location_mb): - if not target_trait['mb'] or not target_trait['chr']: - return True - if target_dataset["type"] in ["ProbeSet", "Geno"] and location_type == "gene": + if not target_trait['mb'] or not target_trait['chr']: + return True return ( ((location_chr!=None) and (target_trait["chr"]!=location_chr)) or -- cgit v1.2.3