From 2f4d140ba3641c14d6a5f12a214a41c0741190d1 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 1 Aug 2024 19:01:32 +0000 Subject: Fix correlation bug caused by a result trait not having a location --- gn2/wqflask/correlation/show_corr_results.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gn2/wqflask/correlation') diff --git a/gn2/wqflask/correlation/show_corr_results.py b/gn2/wqflask/correlation/show_corr_results.py index 68e424b4..be48abc2 100644 --- a/gn2/wqflask/correlation/show_corr_results.py +++ b/gn2/wqflask/correlation/show_corr_results.py @@ -90,6 +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": return ( ((location_chr!=None) and (target_trait["chr"]!=location_chr)) -- cgit v1.2.3