aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
authorzsloan2024-08-05 17:49:06 +0000
committerAlexander_Kabui2024-08-28 15:02:46 +0300
commitf142f53a388945e4dd85083d6c989c14a882f0ce (patch)
tree6e1d975ab83a161aaf050cfa2f9d2f98e90fcc8f /gn2
parentb3f1bb33177dbccbdf564506e367c4315e8803fc (diff)
downloadgenenetwork2-f142f53a388945e4dd85083d6c989c14a882f0ce.tar.gz
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
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/correlation/show_corr_results.py5
1 files 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