SNPitty: An intuitive web-application for interactive B-allele frequency and copy-number visualization of next generation sequencing data.

docker license

Exploration and visualization of next-generation sequencing data is crucial for clinical diagnostics. Software allowing simultaneous visualization of multiple regions-of-interest coupled with dynamic heuristic filtering of genetic aberrations is however lacking.

Therefore, we developed the web-application SNPitty that allows interactive visualization and interrogation of Variant Call Format (VCF) files by utilizing B-allele frequencies (BAF) of single nucleotide polymorphisms (SNPs) and single nucleotide variants (SNVs), coverage metrics and copy-numbers analysis results.

SNPitty is best applicable to display variant alleles and allelic imbalances with a focus on loss of heterozygosity (LOH) and copy number variation using genome-wide heterozygous markers and somatic mutations. Moreover, SNPitty is capable of generating predefined reports that summarize and highlight disease-specific targets-of-interest.

Due to dependencies on the latest R and BioConductor versions, it is highly advised to use the pre-compiled Docker image which contains an out-of-the-box working SNPitty and all features.

Table of Contents

  1. Docker Installation
  2. Usage
  3. Extra



A Docker image has been made available for SNPitty which eases installation and deployment.

Simply download Docker for Windows or Linux and pull the SNPitty image:

docker pull ccbc/snpitty

You can now deploy SNPitty using the following command, SNPitty can then be reached using any modern-web browser:

# You need to specify an unused port which will be used to connect to SNPitty. Port 3382 is also used to host a local exporting server.
docker run -p <yourport>:3383 -p 3382:3382 --net=host ccbc/snpitty

# E.g. to make SNPitty available on http://<ip>:1234/
# docker run -p 1234:3383 -p 3382:3382 --net=host  ccbc/snpitty

For additional Docker options, please refer to the official Docker documentation.


New versions of SNPitty can easily be retrieved by pulling the latest image and (re)starting the container.

# Pull latest image.
docker pull ccbc/snpitty

# Stop old container (if needed).

# Start new container with updated SNPitty.
docker run -p <yourport>:3383 -p 3382:3382 ccbc/snpitty


Each connection to SNPitty is run on an independent session which allows multiple users to connect simultanously whilst separating data/users to each respective session.

Multiple VCF and GTF files can be uploaded using the respective upload forms but can also be given as GET parameters in the URL in the following manner to allow linking to sessions with pre-loaded data and custom settings:

For single VCF file with additional region file:


These files must be network-accessible or mounted to the Docker container running SNPitty. If the files are mounted to the Docker container, localhost/sampleX/panelXYZ.vcf can be used.


GTF files containing regional coordinates can be used to group and display multiple variants together. This allows users to view/filter on various regions-of-interest, similar to viewing/filtering on chromosomes. For example, if a GTF file containing the chromosomal start/end locations of disease-specific genes is added, it allows users to only filter and display the EGFR, TP53 and PTEN genes. Variants in the VCF file are grouped into regions based on genomic overlap.


SNPitty uses temporary sessions, each new connection to SNPitty (browsing to SNPitty) will create a new unique session. This enables data-separation and allows for multiple users to simultaneously make use of SNPitty on the same server. After closing an active connection to SNPitty (closing the browser/tab) all server-side session data is removed.


Several settings can be altered from the settings page within SNPitty. These are only remembered for the current session. Another method to provide session-specific settings is to provide these in the URL, e.g: *;0.9&zoomType=T&logReads=T&markVariants=G/A

The following settings can be altered via URL:


Include additional report templates.

To include additional Rnw files (used as report templates), a directory with the Rnw files can be mounted into the Docker Container using the following command:

docker run -v <directoryWithRnwFiles>:/usr/local/lib/R/site-library/SNPitty/inst/shiny/reportTemplates/ ccbc/snpitty

Manual Installation (Not advised)

You can also download and install SNPitty separate from the pre-installed docker environment as an R package.

SNPitty can be downloaded directly from the development branch on BitBucket using the following commands in R:

# Require/install devtools package if not already installed.
if (!require("devtools")) install.packages("devtools", repos = "")
# Install SNPitty from BitBucket
devtools::install_bitbucket(repo = "ccbc/snpitty")

# Download all required packages

SNPitty houses an internal function (loadSNPittyPackages()) to automatically download and install its dependencies.

To enable VCF file merging, bcftools, tabix and bgzip need to be installed in /usr/bin/. Please follow the independent manuals for each tool to do so.

To start SNPitty from R, use the following command:

# For external access, an open network port must be given.
SNPitty::startSNPitty(host='', port=<yourPort>)

# E.g.
# SNPitty::startSNPitty(host='', port=1234)

Automatic reporting

To enable report functionality the following software needs to be installed:

  • pdflatex
    • Linux: sudo apt-get install texlive-latex-base (Or relevant package manager)
    • Windows: Download Miktex

Local Highcharts exporting server

SNPitty uses the HighCharts JS library to create interactive plots. These plots can be exported as SVG/PNG/PDF images, a local exporting server should be running on port 3382. Please see here for manual instructions. The Docker already has this functionality installed and running in port 3382.


Windows support (without using Docker) is limited as most of the underlying tools are made with Unix-systems in mind. Testing shows that the main functions such as uploading VCF/GTF and visualization BAF are working. However, the following functions work only sparsely on Windows:

  • VCF merging.
  • Export function.