From 79396ae42c395d4383441248d85405c97f45faf1 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 20 Dec 2019 13:15:33 -0600 Subject: Made regular search work when using the phenotype IDs that include the 3 letter codes --- wqflask/wqflask/do_search.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'wqflask') 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]) + "[[:>:]]" -- cgit v1.2.3