diff options
author | Pjotr Prins | 2020-04-26 13:20:13 -0500 |
---|---|---|
committer | Pjotr Prins | 2020-04-26 13:20:13 -0500 |
commit | c0909b461effecb8051020a4f186a40b8867b574 (patch) | |
tree | 8a910a67072299a48d70ff40e304641f4c1953b4 | |
parent | cdcfb086de9277a1c1b2d8de57ceb78ae8683f53 (diff) | |
parent | 14d49450c47e8ef3b34bca9e759acd371319a854 (diff) | |
download | genenetwork2-c0909b461effecb8051020a4f186a40b8867b574.tar.gz |
Merge branch 'testing' of github.com:genenetwork/genenetwork2 into testing
-rw-r--r-- | .DS_Store | bin | 6148 -> 0 bytes | |||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README.md | 11 | ||||
-rwxr-xr-x | bin/genenetwork2 | 2 | ||||
-rw-r--r-- | etc/default_settings.py | 12 | ||||
-rw-r--r-- | wqflask/base/data_set.py | 14 | ||||
-rw-r--r-- | wqflask/runserver.py | 1 | ||||
-rw-r--r-- | wqflask/utility/tools.py | 1 | ||||
-rw-r--r-- | wqflask/wqflask/api/gen_menu.py | 5 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/dataset_menu_structure.json | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | wqflask/wqflask/templates/show_trait_mapping_tools.html | 0 |
11 files changed, 39 insertions, 27 deletions
diff --git a/.DS_Store b/.DS_Store Binary files differdeleted file mode 100644 index d992942f..00000000 --- a/.DS_Store +++ /dev/null @@ -1,4 +1,3 @@ -# gitignore *.pyc *.orig *.bak @@ -25,16 +25,15 @@ Once installed GN2 can be run online through a browser interface genenetwork2 ``` -(default is http://localhost:5003/). For full examples (you'll need to -set a number of environment variables), including running scripts and -a Python REPL, for example +(default is http://localhost:5003/). A quick example is ```sh -env GN2_PROFILE=~/opt/gn-latest GENENETWORK_FILES=~/data/gn2_data ./bin/genenetwork2 +env GN2_PROFILE=~/opt/gn-latest SERVER_PORT=5300 GENENETWORK_FILES=~/data/gn2_data/ ./bin/genenetwork2 ./etc/default_settings.py -gunicorn-dev ``` -see the startup script -[./bin/genenetwork2](https://github.com/genenetwork/genenetwork2/blob/testing/bin/genenetwork2). +For full examples (you may need to set a number of environment +variables), including running scripts and a Python REPL, also see the +startup script [./bin/genenetwork2](https://github.com/genenetwork/genenetwork2/blob/testing/bin/genenetwork2). Also Mysql and Elasticsearch need to be running, see [INSTALL](./doc/README.org). diff --git a/bin/genenetwork2 b/bin/genenetwork2 index 1c538e86..759c71dc 100755 --- a/bin/genenetwork2 +++ b/bin/genenetwork2 @@ -209,7 +209,7 @@ if [ "$1" = '-gunicorn-prod' ] ; then echo PYTHONPATH=$PYTHONPATH if [ -z $SERVER_PORT ]; then echo "ERROR: Provide a SERVER_PORT" ; exit 1 ; fi PID=$TMPDIR/gunicorn.$USER.pid - cmd="--bind 0.0.0.0:$SERVER_PORT --pid $PID -k eventlet --workers 20 --keep-alive 1200 --max-requests 1000 --timeout 1200 wsgi" + cmd="--bind 0.0.0.0:$SERVER_PORT --pid $PID -k eventlet --workers 20 --keep-alive 6000 --max-requests 1000 --timeout 1200 wsgi" echo RUNNING gunicorn $cmd gunicorn $cmd exit $? diff --git a/etc/default_settings.py b/etc/default_settings.py index 4a35f42d..64a78686 100644 --- a/etc/default_settings.py +++ b/etc/default_settings.py @@ -25,6 +25,10 @@ import os import sys GN_VERSION = open("../etc/VERSION","r").read() +GN_SERVER_URL = "http://localhost:8880/" # REST API server + +# ---- MySQL + SQL_URI = "mysql://gn2:mysql_password@localhost/db_webqtl_s" SQL_ALCHEMY_POOL_RECYCLE = 3600 GN_SERVER_URL = "http://localhost:8880/" # REST API server @@ -45,13 +49,13 @@ SECRET_HMAC_CODE = '\x08\xdf\xfa\x93N\x80\xd9\\H@\\\x9f`\x98d^\xb4a;\xc6OM\x946a GITHUB_CLIENT_ID = "UNKNOWN" GITHUB_CLIENT_SECRET = "UNKNOWN" -GITHUB_AUTH_URL = "UNKNOWN" -GITHUB_API_URL = "UNKNOWN" +GITHUB_AUTH_URL = "https://github.com/login/oauth/authorize" +GITHUB_API_URL = "https://api.github.com/user" ORCID_CLIENT_ID = "UNKNOWN" ORCID_CLIENT_SECRET = "UNKNOWN" -ORCID_AUTH_URL = "UNKNOWN" -ORCID_TOKEN_URL = "UNKNOWN" +ORCID_AUTH_URL = "https://orcid.org/oauth/authorize" +ORCID_TOKEN_URL = "https://orcid.org/oauth/token" ELASTICSEARCH_HOST = "localhost" ELASTICSEARCH_PORT = '9200' diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index 8652e6b7..1f99df49 100644 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -64,7 +64,7 @@ logger = getLogger(__name__ ) # Each subclass will add to this DS_NAME_MAP = {} -def create_dataset(dataset_name, rebuild=True, dataset_type = None, get_samplelist = True, group_name = None): +def create_dataset(dataset_name, dataset_type = None, get_samplelist = True, group_name = None): if not dataset_type: dataset_type = Dataset_Getter(dataset_name) @@ -77,7 +77,7 @@ def create_dataset(dataset_name, rebuild=True, dataset_type = None, get_sampleli class Dataset_Types(object): - def __init__(self, rebuild=False): + def __init__(self): """Create a dictionary of samples where the value is set to Geno, Publish or ProbeSet. E.g. @@ -93,13 +93,9 @@ Publish or ProbeSet. E.g. """ self.datasets = {} - if rebuild: #ZS: May make this the only option - 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" - with open(file_name, 'r') as fh: - data = json.load(fh) + data = json.loads(requests.get(GN2_BASE_URL + "/api/v_pre1/gen_dropdown").content) + #data = gen_menu.gen_dropdown_json() + for species in data['datasets']: for group in data['datasets'][species]: diff --git a/wqflask/runserver.py b/wqflask/runserver.py index 7c06356b..15572d97 100644 --- a/wqflask/runserver.py +++ b/wqflask/runserver.py @@ -9,6 +9,7 @@ from wqflask import app + import logging import utility.logger logger = utility.logger.getLogger(__name__ ) diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py index 9354ece6..2914d354 100644 --- a/wqflask/utility/tools.py +++ b/wqflask/utility/tools.py @@ -233,6 +233,7 @@ def show_settings(): # Cached values GN_VERSION = get_setting('GN_VERSION') HOME = get_setting('HOME') +SERVER_PORT = get_setting('SERVER_PORT') WEBSERVER_MODE = get_setting('WEBSERVER_MODE') GN2_BASE_URL = get_setting('GN2_BASE_URL') GN2_BRANCH_URL = get_setting('GN2_BRANCH_URL') diff --git a/wqflask/wqflask/api/gen_menu.py b/wqflask/wqflask/api/gen_menu.py index 64a413c2..adf66fb5 100644 --- a/wqflask/wqflask/api/gen_menu.py +++ b/wqflask/wqflask/api/gen_menu.py @@ -36,11 +36,6 @@ def gen_dropdown_json(): types=types, datasets=datasets) - output_file = """./wqflask/static/new/javascript/dataset_menu_structure.json""" - - with open(output_file, 'w') as fh: - json.dump(data, fh, indent=3, sort_keys=True) - return data def get_species(): diff --git a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json index daf818b1..679e38b0 100644 --- a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json +++ b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json @@ -5172,6 +5172,23 @@ "HSNIH-Rat-PL-RSeq-0818", "HSNIH-Palmer Prelimbic Cortex RNA-Seq (Aug18) rlog" ] + ], + "Prefrontal Cortex mRNA": [ + [ + "864", + "HSNIH-Rat-VoLo-RSeq-0818", + "HSNIH-Palmer Orbitofrontal Cortex RNA-Seq (Aug18) rlog" + ], + [ + "863", + "HSNIH-Rat-PL-RSeq-0818", + "HSNIH-Palmer Prelimbic Cortex RNA-Seq (Aug18) rlog" + ], + [ + "861", + "HSNIH-Rat-IL-RSeq-0818", + "HSNIH-Palmer Infralimbic Cortex RNA-Seq (Aug18) rlog" + ] ] }, "HSNIH-RGSMC": { @@ -7564,4 +7581,4 @@ ] } } -}
\ No newline at end of file +} diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html index 777d4a2d..777d4a2d 100644..100755 --- a/wqflask/wqflask/templates/show_trait_mapping_tools.html +++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html |