MyGeneset.info is a web API for accessing gene set data.
- Python>=3.6 (Python versions lower than 3.8 also require PyPI package
singledispatchmethod
) - Git
- MongoDB
- Elasticsearch>=6.0.0, <7.0.0
Elasticsearch and MongoDB can be installed locally, or run from Docker containers:
MongoDB:
docker run -d -p 27017-27019:27017-27019 --name mongodb mongo:latest
Elasticsearch:
docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --name elasticsearch docker.elastic.co/elasticsearch/elasticsearch:6.8.13
git clone https://github.com/biothings/mygeneset.info.git
With virtualenv:
mkdir -p ~/venvs
virtualenv ~/venvs/mygeneset
source ~/venvs/mygeneset/bin/activate
Alternatively, using miniconda:
conda create -n mygeneset python=3.8
conda activate mygeneset
cd mygeneset.info
pip install -r ./requirements_hub.txt
cd src
vim config.py
from config_hub import * # Add additional customizations
# from src folder:
ssh-keygen -f bin/ssh_host_key
# from src folder:
python -m bin.hub
Navigate to https://studio.biothings.io/ and create a connection to http://localhost:HUB_API_PORT
,
in which HUB_API_PORT
is the port number specified in your configuration (default is 19480).
The API configuration file is located under /src/config_web.py
.
The value of STATUS_CHECK.id should match an _id
in the data.
STATUS_CHECK = {
'id': 'WP4966',
'index': 'mygeneset_current',
'doc_type': 'geneset'
}
Optionally, edit the port number and host in ES_HOST.
python index.py