diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/do_search.py | 19 | ||||
-rw-r--r-- | wqflask/wqflask/templates/gsearch_pheno.html | 11 |
2 files changed, 20 insertions, 10 deletions
diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py index e0f4eb17..a7f117ec 100644 --- a/wqflask/wqflask/do_search.py +++ b/wqflask/wqflask/do_search.py @@ -109,23 +109,26 @@ class MrnaAssaySearch(DoSearch): 'Additive Effect'] def get_where_clause(self): - - aliases = get_aliases(escape(self.search_term[0]), self.dataset.group.species) - if len(aliases) > 0: - search_string = " ".join(aliases) - else: - search_string = escape(self.search_term[0]) + search_string = escape(self.search_term[0]) if self.search_term[0] != "*": - match_clause = """(MATCH (ProbeSet.Name, + match_clause = """((MATCH (ProbeSet.Name, ProbeSet.description, ProbeSet.symbol, alias, GenbankId, UniGeneId, Probe_Target_Description) - AGAINST ('%s' IN BOOLEAN MODE)) and + AGAINST ('%s' IN BOOLEAN MODE)) """ % (search_string) + + aliases = get_aliases(search_string, self.dataset.group.species) + if len(aliases) > 0: + match_clause += " or " + alias_string = " ".join(aliases) + match_clause += "(MATCH (ProbeSet.symbol) AGAINST ('%s' IN BOOLEAN MODE))) and " % alias_string + else: + match_clause += ") and " else: match_clause = "" diff --git a/wqflask/wqflask/templates/gsearch_pheno.html b/wqflask/wqflask/templates/gsearch_pheno.html index 4e142846..c626a589 100644 --- a/wqflask/wqflask/templates/gsearch_pheno.html +++ b/wqflask/wqflask/templates/gsearch_pheno.html @@ -184,10 +184,17 @@ 'render': function(data, type, row, meta) { author_list = data.authors.split(",") if (author_list.length >= 6) { - return author_list.slice(0, 6).join(",") + ", et al." + author_string = author_list.slice(0, 6).join(",") + ", et al." } else{ - return data.authors + author_string = data.authors } + + try { + return decodeURIComponent(escape(author_string)) + } catch(err) { + return author_string + } + } }, { |