aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2019-12-20 13:15:33 -0600
committerzsloan2019-12-20 13:15:33 -0600
commit79396ae42c395d4383441248d85405c97f45faf1 (patch)
treeff1a69a3d2c96804c100a393c69bd686cb432e50 /wqflask
parent92d67ae3a889c2939c950cc1fba0c6b7221cf4f5 (diff)
downloadgenenetwork2-79396ae42c395d4383441248d85405c97f45faf1.tar.gz
Made regular search work when using the phenotype IDs that include the 3 letter codes
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/do_search.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py
index ace73490..465edbaa 100644
--- a/wqflask/wqflask/do_search.py
+++ b/wqflask/wqflask/do_search.py
@@ -36,6 +36,11 @@ class DoSearch(object):
logger.debug("self.dataset is boo: ", type(self.dataset), pf(self.dataset))
logger.debug("self.dataset.group is: ", pf(self.dataset.group))
#Get group information for dataset and the species id
+
+ if self.dataset.type == "Publish":
+ if len(self.search_term[0].split("_")) > 1:
+ self.search_term[0] = self.search_term[0].split("_")[1]
+
self.species_id = webqtlDatabaseFunction.retrieve_species_id(self.dataset.group.name)
def execute(self, query):
@@ -228,6 +233,7 @@ class PhenotypeSearch(DoSearch):
#Todo: Zach will figure out exactly what both these lines mean
#and comment here
+
if "'" not in self.search_term[0]:
search_term = "[[:<:]]" + self.handle_wildcard(self.search_term[0]) + "[[:>:]]"