aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2015-05-19 22:48:57 +0000
committerzsloan2015-05-19 22:48:57 +0000
commit929f12176c4932c9cf370ab397e442e37802fbb9 (patch)
tree30f5e1974f05d1357f2c9a219b288c717cd65e38
parent85113d61f09cc7d7f8a6501353d46ec2a4c319b4 (diff)
downloadgenenetwork2-929f12176c4932c9cf370ab397e442e37802fbb9.tar.gz
Fixed an issue that caused combined search to not work
-rwxr-xr-xwqflask/wqflask/do_search.py23
-rwxr-xr-xwqflask/wqflask/search_results.py1
2 files changed, 12 insertions, 12 deletions
diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py
index b467655b..44e2c875 100755
--- a/wqflask/wqflask/do_search.py
+++ b/wqflask/wqflask/do_search.py
@@ -497,9 +497,11 @@ class LrsSearch(DoSearch):
def get_from_clause(self):
if self.search_operator == "=":
- self.from_clause = ", Geno"
+ from_clause = ", Geno"
else:
- self.from_clause = ""
+ from_clause = ""
+
+ return from_clause
def get_where_clause(self):
self.search_term = [float(value) for value in self.search_term]
@@ -526,7 +528,7 @@ class LrsSearch(DoSearch):
print("self.sub_clause is:", pf(self.sub_clause))
#%s.Chr = Geno.Chr
- self.where_clause = self.sub_clause + """ %sXRef.Locus = Geno.name and
+ where_clause = self.sub_clause + """ %sXRef.Locus = Geno.name and
Geno.SpeciesId = %s
""" % self.mescape(self.dataset.type,
self.species_id)
@@ -536,10 +538,9 @@ class LrsSearch(DoSearch):
self.sub_clause = """ %sXRef.LRS %s %s """ % self.mescape(self.dataset.type,
self.search_operator,
self.search_term[0])
- self.where_clause = self.sub_clause
-
-
- #return where_clause
+ where_clause = self.sub_clause
+
+ return where_clause
def run(self):
@@ -557,8 +558,8 @@ class MrnaLrsSearch(LrsSearch, MrnaAssaySearch):
def run(self):
- self.get_from_clause()
- self.get_where_clause()
+ self.from_clause = self.get_from_clause()
+ self.where_clause = self.get_where_clause()
self.query = self.compile_final_query(from_clause = self.from_clause, where_clause = self.where_clause)
return self.execute(self.query)
@@ -569,8 +570,8 @@ class PhenotypeLrsSearch(LrsSearch, PhenotypeSearch):
def run(self):
- self.get_from_clause()
- self.get_where_clause()
+ self.from_clause = self.get_from_clause()
+ self.where_clause = self.get_where_clause()
self.query = self.compile_final_query(from_clause = self.from_clause, where_clause = self.where_clause)
return self.execute(self.query)
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index 2a1e8bb3..6614520e 100755
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -239,7 +239,6 @@ class SearchResultPage(object):
for a_search in self.search_terms:
the_search = self.get_search_ob(a_search)
self.results.extend(the_search.run())
- #print("in the search results are:", self.results)
self.header_fields = the_search.header_fields