This repository contains scripts and libraries for running the backend Django server required for the CATH-SM (CATH/SWISS-MODEL) protein sequence modelling pipeline.
This code provides a Django server that manages a protein structural modelling pipeline via asynchronous web jobs to CATH and SWISS-MODEL APIs.
Local computation is carried out by a Celery worker (with Redis used as the cache/message broker).
A public deployment can be found here:
Overview:
- Install dependencies
- Setup Python environment
- Start up Celery worker
- Start up Django server
Redis is used as a cache/message broker:
# Ubuntu
sudo apt-get install redis
# CentOS / RedHat
sudo yum install redis
Run the service in the background.
sudo systemctl enable redis
sudo systemctl start redis
Note: PostgreSQL is used as the deployment database (which will also need to be installed and configured), however the development database uses the built-in SQLite.
python3 -m venv venv
. venv/bin/activate
pip install -e .
python3 -m pytest
cd cathsm-server && source venv/bin/activate
python3 manage.py makemigrations
python3 manage.py migrate
cd cathsm-server && source venv/bin/activate
CATHAPI_DEBUG=1 celery -A cathapi worker
cd cathsm-server && source venv/bin/activate
CATHAPI_DEBUG=1 python3 manage.py runserver
An instance of cathsm-server
should now be available at: