-
Notifications
You must be signed in to change notification settings - Fork 2
Install
Dave Lawrence edited this page Feb 27, 2023
·
52 revisions
Tested on Ubuntu 20.04 VM and Ubuntu 21.10
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
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:
# As Variantgrid user
python3 -m nltk.downloader punkt
python3 -m nltk.downloader averaged_perceptron_tagger
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
# Only do these steps if you're building your own DB from scratch (otherwise download/restore dump see below)
python3 manage.py migrate
python3 manage.py createsuperuser
Especially for production use, you'll need to adjust the settings
Best bet is to use homebrew to install many of the binary dependencies:
brew install numpy
brew install samtools
# probably more brew install binaries that I did historically that should be mentioned here
Some tricks, for bgzip:
brew install libomp
CPPFLAGS="-I/opt/homebrew/include" pip install bgzip
You'll also need this (or something like this with different versions in the appropriate environment.py file)
GDAL_LIBRARY_PATH="/opt/homebrew/Cellar/gdal/3.4.2_2/lib/libgdal.30.dylib"
GEOS_LIBRARY_PATH="/opt/homebrew/Cellar/geos/3.10.2/lib/libgeos_c.dylib"
- Install VEP - variant annotation
- Install VT - need a patched version
- 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 NCBI liftover - if you also want to use NCBI remap to liftover between builds