aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
authorGN22020-04-24 16:09:10 -0500
committerGN22020-04-24 16:09:10 -0500
commit789252703c00bcbdd98dd5088d0e4651e750a24a (patch)
treef3ed2c01e2ecffc56c924e26f45f0128f26e200b /wqflask/base
parentc5c9f0e793ca729aa14dc38b7e8de1cb713ed730 (diff)
parentd56ae51d72335c10e5f08c22a4e0cba1ab3547cb (diff)
downloadgenenetwork2-789252703c00bcbdd98dd5088d0e4651e750a24a.tar.gz
Merge branch 'testing' of https://github.com/genenetwork/genenetwork2 into HEAD
Diffstat (limited to 'wqflask/base')
-rw-r--r--wqflask/base/data_set.py4
-rw-r--r--wqflask/base/trait.py7
2 files changed, 6 insertions, 5 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index fae62875..8652e6b7 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -56,7 +56,7 @@ from pprint import pformat as pf
from db.gn_server import menu_main
from db.call import fetchall,fetchone,fetch1
-from utility.tools import USE_GN_SERVER, USE_REDIS, flat_files, flat_file_exists
+from utility.tools import USE_GN_SERVER, USE_REDIS, flat_files, flat_file_exists, GN2_BASE_URL
from utility.logger import getLogger
logger = getLogger(__name__ )
@@ -94,7 +94,7 @@ Publish or ProbeSet. E.g.
"""
self.datasets = {}
if rebuild: #ZS: May make this the only option
- data = json.loads(requests.get("http://gn2.genenetwork.org/api/v_pre1/gen_dropdown").content)
+ data = json.loads(requests.get(GN2_BASE_URL + "/api/v_pre1/gen_dropdown").content)
#data = gen_menu.gen_dropdown_json()
else:
file_name = "wqflask/static/new/javascript/dataset_menu_structure.json"
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 5525472e..e454c593 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -14,6 +14,7 @@ from base.data_set import create_dataset
from db import webqtlDatabaseFunction
from utility import webqtlUtil
from utility import hmac
+from utility.tools import GN2_BASE_URL
from wqflask import app
@@ -135,9 +136,9 @@ class GeneralTrait(object):
alias = 'Not available'
if self.symbol:
- human_response = requests.get("http://gn2.genenetwork.org/gn3/gene/aliases/" + self.symbol.upper())
- mouse_response = requests.get("http://gn2.genenetwork.org/gn3/gene/aliases/" + self.symbol.capitalize())
- other_response = requests.get("http://gn2.genenetwork.org/gn3/gene/aliases/" + self.symbol.lower())
+ human_response = requests.get(GN2_BASE_URL + "gn3/gene/aliases/" + self.symbol.upper())
+ mouse_response = requests.get(GN2_BASE_URL + "gn3/gene/aliases/" + self.symbol.capitalize())
+ other_response = requests.get(GN2_BASE_URL + "gn3/gene/aliases/" + self.symbol.lower())
if human_response and mouse_response and other_response:
alias_list = json.loads(human_response.content) + json.loads(mouse_response.content) + json.loads(other_response.content)