nikostr/dna-seq-deepvariant-glnexus-variant-calling

A Snakemake workflow for variant calling with DeepVariant, and optionally joint variant calling using GLnexus.

Overview

Topics: genomic-variant-calling deepvariant sciworkflows snakemake reproducibility

Latest release: v0.3.1, Last update: 2021-06-30

Linting: linting: passed, Formatting:formatting: passed

Deployment

Step 1: Install Snakemake and Snakedeploy

Snakemake and Snakedeploy are best installed via the Mamba package manager (a drop-in replacement for conda). If you have neither Conda nor Mamba, it is recommended to install Miniforge. More details regarding Mamba can be found here.

When using Mamba, run

mamba create -c conda-forge -c bioconda --name snakemake snakemake snakedeploy

to install both Snakemake and Snakedeploy in an isolated environment. For all following commands ensure that this environment is activated via

conda activate snakemake

Step 2: Deploy workflow

With Snakemake and Snakedeploy installed, the workflow can be deployed as follows. First, create an appropriate project working directory on your system and enter it:

mkdir -p path/to/project-workdir
cd path/to/project-workdir

In all following steps, we will assume that you are inside of that directory. Then run

snakedeploy deploy-workflow https://github.com/nikostr/dna-seq-deepvariant-glnexus-variant-calling . --tag v0.3.1

Snakedeploy will create two folders, workflow and config. The former contains the deployment of the chosen workflow as a Snakemake module, the latter contains configuration files which will be modified in the next step in order to configure the workflow to your needs.

Step 3: Configure workflow

To configure the workflow, adapt config/config.yml to your needs following the instructions below.

Step 4: Run workflow

The deployment method is controlled using the --software-deployment-method (short --sdm) argument.

To run the workflow using a combination of conda and apptainer/singularity for software deployment, use

snakemake --cores all --sdm conda apptainer

Snakemake will automatically detect the main Snakefile in the workflow subfolder and execute the workflow module that has been defined by the deployment in step 2.

For further options such as cluster and cloud execution, see the docs.

Step 5: Generate report

After finalizing your data analysis, you can automatically generate an interactive visual HTML report for inspection of results together with parameters and code inside of the browser using

snakemake --report report.zip

Configuration

The following section is imported from the workflow’s config/README.md.

General settings

Adjust config.yaml to configure the workflow execution. The config files samples.tsv and joint_calling_groups.tsv contain the following sample information:

  • samples.tsv lists the samples as well as the read sets for each sample, with one set of reads for each sample_id-unit. Note that sample_id-unit combinations should be unique.
  • joint_calling_groups.tsv groups samples for joint calling. Note that jointly called samples will be named with the format group:sample_id in the GLnexus output and in the final all.vcf.gz file.

The pipeline will call all samples individually. Samples specified as belonging to the same joint calling group will be called jointly by GLnexus. To call all samples jointly, specify them as all belonging to the same joint calling group. Samples that are only called individually do not need to be specified in joint_calling_groups.tsv.

Linting and formatting

Linting results

None

Formatting results

None