aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2022-10-17 19:38:57 +0000
committerzsloan2022-10-17 19:38:57 +0000
commit8a6c81c8963f72958aa36a488e707669af7c7713 (patch)
tree159e28087e973bfecaeb9df141fa18248d16e488
parent619548466f49c985ad77183e3722a3c47ab85425 (diff)
downloadgenenetwork2-8a6c81c8963f72958aa36a488e707669af7c7713.tar.gz
Fix correlation filter logic
-rw-r--r--wqflask/wqflask/correlation/show_corr_results.py31
1 files 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