- Python 3.7 or higher, and the following modules:
- minimap2 version 2.1+
- FastTree2 version 2.1.10+, compiled for double precision
- TreeTime version 0.7.5+
- RapidNJ
- git
- Node.js version 18.0.0+
- npm
- R (tested on 4.2.1) and the following packages:
If running locally (without dedicated GISAID feed):
-
Navigate to the directory in your filesystem under which you want to install the
covizu
directory -
Clone the repository:
git clone https://github.com/PoonLab/covizu
- Install with:
sudo python3 setup.py install # omit `sudo` if you don't have superuser privileges
-
[Optional] Install PostgreSQL - Database for Extracted Features
- Download and install PostgreSQL based on your operating system or pull the latest docker image
- The following environment variables must be defined:
POSTGRES_USER
- User name set up during installation of PostgreSQLPOSTGRES_PASSWORD
- Password for the given user name
- Optional environment variables:
POSTGRES_DB
- The desired database name to use for the analysis. The default database name isgisaid_db
POSTGRES_HOST
- The host name where PostgreSQL is running on. The default host islocalhost
POSTGRES_PORT
- The port used by PostgreSQL. The default port number is5432
-
[Optional] Using Docker
- In the root directory, run the following command to build and start PostgreSQL. This will create a default network called
covizu_default
docker compose up -d postgres
- In a
.env
file, include the following:POSTGRES_HOST=postgres
POSTGRES_USER=
POSTGRES_PASSWORD=
- Build the docker image from the
Dockerfile.backend
Dockerfile using the following command:docker build --platform=linux/amd64 -t covizu-backend -f Dockerfile.backend .
- Create a container named
backend
from thecovizu-backend
image using the following command:docker run --name backend --volume ${PWD}:/root/covizu --network covizu_default --env-file .env -itd covizu-backend
- In the root directory, run the following command to build and start PostgreSQL. This will create a default network called
If you're running the server (front-end) for the first time, obtain the following data files from our main server at https://filogeneti.ca/covizu/data/:
timetree.nwk
dbstats.json
clusters.json
and save your local copies undercovizu/data/
.
Next, make 3 separate environment files for the NodeJS server.
HTTP_PORT='8001'
NODE_ENV='TEST'
DATA_FOLDER='data_test'
HTTP_PORT='8001'
NODE_ENV='DEV'
DATA_FOLDER='data'
ADMIN_USERNAME='admin'
ADMIN_PASSWORD='password'
COVIZU_USERNAME='covizu'
COVIZU_PASSWORD='password'
DB_URL='localhost:27017'
HTTP_PORT='8001'
HTTPS_PORT='8002'
NODE_ENV='PROD'
DATA_FOLDER='data'
PRVTKEY='/path/to/private-key-file.pem'
CRT='/path/to/certificate-file.crt'
ADMIN_USERNAME='admin'
ADMIN_PASSWORD='password'
COVIZU_USERNAME='covizu'
COVIZU_PASSWORD='password'
DB_URL='localhost:27017'
Install and configure the MongoDB
database by following these instructions
Finally, run the following commands:
cd covizu
npm install
npm run start-db1
Once you launch the local webserver with npm start
, allow up to a minute for the server to initialize and then navigate your browser to localhost:8001
.
To run the end-to-end tests with Cypress start the test server
npm test
and in a new terminal terminal window run
npx cypress run --config-file "config/cypress.config.js"