diff options
author | zsloan | 2020-01-09 12:38:35 -0600 |
---|---|---|
committer | zsloan | 2020-01-09 12:38:35 -0600 |
commit | 9a469f6fc380a1bcb194a3dd819fab6667a26fd5 (patch) | |
tree | 769d9d1243036f9b275a5d71bbf69308cf719619 | |
parent | b2376992c7eb7658bb83867cb304be4e319ec3f1 (diff) | |
download | genenetwork2-9a469f6fc380a1bcb194a3dd819fab6667a26fd5.tar.gz |
Fixed issue that caused LRS searches that include location to not work properly
-rw-r--r-- | wqflask/wqflask/do_search.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py index 465edbaa..061aacaa 100644 --- a/wqflask/wqflask/do_search.py +++ b/wqflask/wqflask/do_search.py @@ -475,11 +475,6 @@ class LrsSearch(DoSearch): DoSearch.search_types[search_key] = "LrsSearch" def get_from_clause(self): - #If the user typed, for example "Chr4", the "Chr" substring needs to be removed so that all search elements can be converted to floats - if len(self.search_term) > 2 and "chr" in self.search_term[2].lower(): - chr_num = self.search_term[2].lower().replace("chr", "") - self.search_term[2] = chr_num - converted_search_term = [] for value in self.search_term: try: @@ -511,7 +506,11 @@ class LrsSearch(DoSearch): max(lrs_min, lrs_max)) if len(self.search_term) > 2: + #If the user typed, for example "Chr4", the "Chr" substring needs to be removed so that all search elements can be converted to floats chr_num = self.search_term[2] + if "chr" in self.search_term[2].lower(): + chr_num = self.search_term[2].lower().replace("chr", "") + self.search_term[2] = chr_num where_clause += """ and Geno.Chr = '%s' """ % (chr_num) if len(self.search_term) == 5: mb_low, mb_high = self.search_term[3:] @@ -554,7 +553,6 @@ class MrnaLrsSearch(LrsSearch, MrnaAssaySearch): DoSearch.search_types['ProbeSet_' + search_key] = "MrnaLrsSearch" def run(self): - self.from_clause = self.get_from_clause() self.where_clause = self.get_where_clause() |