-
Notifications
You must be signed in to change notification settings - Fork 2
Install
Tested on Ubuntu 20.04 VM and Ubuntu 21.10 and 22.04.03
You need Git to download the repo
sudo apt-get install git
For local development, you probably just want to use your normal account:
# Wherever you want to install repo, eg cd ~/localwork
git clone https://github.com/SACGF/variantgrid
Variantgrid will have many of its settings in a file, typically looked for at
/etc/variantgrid/settings_config.json
This will include database passwords and other sensitive information that shouldn't be in source control.
TODO - document what's required in settings_config.json as well as make a dummy settings_config.json that can be used as a basis.
For a server, create a "variantgrid" user to run the services:
# Server only
export SYSTEM_VARIANTGRID_USER=variantgrid
sudo id -u ${SYSTEM_VARIANTGRID_USER} &>/dev/null || sudo useradd ${SYSTEM_VARIANTGRID_USER} --create-home --shell /bin/bash
sudo mkdir /opt/variantgrid # Or /mnt/variantgrid
sudo chown variantgrid /opt/variantgrid
sudo su variantgrid
cd /opt/
git clone https://github.com/SACGF/variantgrid variantgrid
# Installs dependencies via apt-get and PIP
sudo variantgrid/scripts/install/ubuntu_20_install_dependencies.sh
# Create DB
sudo su postgres -c "psql < variantgrid/scripts/dbscripts/pgsql_database_create.sql"
# Copy secret settings file
sudo mkdir /etc/variantgrid
sudo cp variantgrid/config/settings_config.json /etc/variantgrid
As the user who will run variantgrid: ( For Python3.11 first see Install venv Python3.11 )
# As Variantgrid user
python3 -m nltk.downloader punkt
python3 -m nltk.downloader averaged_perceptron_tagger
If you are deploying to a server, create settings in "env" directory:
cd variantgrid
# Create settings file for this machine (lowercase hostname with dashes removed)
cp variantgrid/settings/env/_settings_template.py variantgrid/settings/env/$(hostname | tr '[:upper:]' '[:lower:]' | tr -d -).py
For developers, keep your config out of source control by putting it in "env_developers"
cd variantgrid
# Create settings file for this machine (lowercase hostname with dashes removed)
mkdir -p variantgrid/settings/env_developers
cp variantgrid/settings/env/_settings_template.py variantgrid/settings/env_developers/$(hostname | tr '[:upper:]' '[:lower:]' | tr -d -).py
At this point, you should ideally restore a DB from a dump (see below) then run:
python3 manage.py createsuperuser
./scripts/upgrade.sh # Then run "auto", then afterwards any manual jobs
Especially for production use, you'll need to adjust the settings
For MacOS see Install on MacOS
- Install VEP - variant annotation
- Install VT - need a patched version
- Install venv Python3.11
- Install from database dump - Optionally download a 1.2G database dump and restore to save setup time
- Install system services - On a server
- Run VariantGrid - Start the services and connect
- Install Annotation - Download / install annotation data
- Install ped_parser and Madeline2 - Pedigree graph generation
- Install Postfix - Mail server (user password reset etc)
- Install bcftools liftover