diff options
author | Pjotr Prins | 2018-03-29 11:18:13 +0000 |
---|---|---|
committer | Pjotr Prins | 2018-03-29 11:18:13 +0000 |
commit | e0c706c51c834caa836ecffd27a5d18fc23178ff (patch) | |
tree | 97f1f47b092bef38856ac34c1bd745e471c38311 /wqflask | |
parent | b9ada0431b880e632b830a6e2169279ae1ecdd36 (diff) | |
download | genenetwork2-e0c706c51c834caa836ecffd27a5d18fc23178ff.tar.gz |
Fixed gsearch blowout https://github.com/genenetwork/genenetwork2/issues/295
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/gsearch.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py index e33e04e1..fe1e17d2 100644 --- a/wqflask/wqflask/gsearch.py +++ b/wqflask/wqflask/gsearch.py @@ -5,6 +5,7 @@ from base.data_set import create_dataset from base.trait import GeneralTrait from db import webqtlDatabaseFunction +from utility.type_checking import is_float, is_int, is_str, get_float, get_int, get_string from utility.benchmark import Bench from utility.logger import getLogger @@ -13,8 +14,13 @@ logger = getLogger(__name__) class GSearch(object): def __init__(self, kw): + assert('type' in kw) + assert('terms' in kw) + self.type = kw['type'] self.terms = kw['terms'] + assert(is_str(self.type)) + if self.type == "gene": sql = """ SELECT |