Installation

There are three ways to run twitcher-workbench, the base package for Twitcher Workbench:

For (optional) bundled reference data, see Reference/annotation data.


Singularity

Pull the pre-built image straight from Docker Hub and convert it to a .sif:

singularity pull twb.sif docker://aryashta/twb:latest

Available tags: latest and version-tagged releases (vX.Y.Z) — see the aryashta/twb Docker Hub page for the current list.

Check the image works:

singularity exec twb.sif twb 

The image also contains the twitcher binary, so it can be used to run Twitcher itself:

singularity exec -B $PWD:$PWD twb.sif twitcher vcf --reference ref.fa.gz -o out.vcf.gz --csv out.csv in.vcf

The bundled Twitcher version may lag behind the latest Twitcher release. Check it with singularity exec twb.sif twitcher --version.

See Usage: Web UI and Usage: CLI for how to run the server for the web UI or the command-line app.

Docker

Pre-built Docker image

The easiest option is to pull a pre-built image published on Docker Hub:

docker pull aryashta/twb:latest

docker tag aryashta/twb:latest twb

Available tags: latest and version-tagged releases (vX.Y.Z).

As with Singularity, the image also contains the twitcher binary:

docker run --rm -v $PWD:$PWD -w $PWD twb twitcher vcf --reference ref.fa.gz -o out.vcf.gz --csv out.csv in.vcf

Local Docker build

Alternatively, one may build the Docker image from scratch using Dockerfile included in this repository.

git clone git@version.helsinki.fi:aryashta/twitcher-viewer.git
cd twitcher-viewer

docker build -t twb .

Twitcher itself is not compiled during the build. The image downloads the prebuilt twitcher-linux-x86_64 binary from the pinned Twitcher release.

The pinned version is defined with the TWITCHER_VERSION build arg (default set in the Dockerfile, currently v0.8.0). This can be overridden to build against a different release:

docker build --build-arg TWITCHER_VERSION=v0.8.2 -t twb .

Once completed, the build can be verified:

docker run --rm twb twitcher --version
docker run --rm twb python --version
docker run --rm twb twb cli --help

See Usage: Web UI and Usage: CLI for how to run the web viewer or CLI commands via Docker, including the bundled-data bind mounts and Docker Compose.

Local / pip install

To install the app within a virtual environment, execute the following commands:

git clone git@version.helsinki.fi:aryashta/twitcher-viewer.git
cd twitcher-viewer

python -m venv twb_env
source twb_env/bin/activate     

pip install -e .

Check that the app works:

twb --help

Note that the virtual environment has to be activated before calling the command:

source twb_env/bin/activate     

twb --help

To leave the environment, type:

deactivate

See Usage: Web UI Server and Usage: CLI for twb serve and twb cli details, and Usage: Web UI for the description of the web UI.