From 9a469f6fc380a1bcb194a3dd819fab6667a26fd5 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 9 Jan 2020 12:38:35 -0600 Subject: Fixed issue that caused LRS searches that include location to not work properly --- wqflask/wqflask/do_search.py | 10 ++++------ 1 file 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() -- cgit v1.2.3