westerdijk-wm/smkwf-bwa-gatk-snpeff
A snakemake workflow for mapping, variant-calling and annotating variants using SNPeff
Overview
Latest release: None, Last update: 2026-07-02
Share link: https://snakemake.github.io/snakemake-workflow-catalog?wf=westerdijk-wm/smkwf-bwa-gatk-snpeff
Quality control: linting: passed formatting: failed
Workflow Rule Graph
This visualization of the workflow’s rule graph was automatically generated using Snakevision
Deployment
Step 1: Install Snakemake and Snakedeploy
Snakemake and Snakedeploy are best installed via the Conda package manager. It is recommended to install conda via Miniforge. Run
conda create -c conda-forge -c bioconda -c nodefaults --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
For other installation methods, refer to the Snakemake and Snakedeploy documentation.
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/westerdijk-wm/smkwf-bwa-gatk-snpeff . --tag None
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
To run the workflow with automatic deployment of all required software via conda/mamba, use
snakemake --cores all --sdm conda
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.
Workflow overview
The workflow is built using snakemake and consists of the following steps:
The workflow is an extension of b-brankovics/bwa-gatk-fasttree-smkwf that add SNP annotation to the workflow.
Download reference genome from NCBI
Download reference genome annotation from NCBI
Map reads using BWA
Call variants using GATK best practices
Build SNPeff DB using the reference genome
Annotate SNPs using SNPeff
Running the workflow
Input data
config.yaml defines two mandatory input files:
units.tsv- A TSV table specifying the input sequencing reads and their mandatory metadatasamples.tsv- A TSV table that needs to contain at least asamplecolumn that lists the samples that will be included in the run
Example content for units.tsv:
sample |
unit |
platform |
fq1 |
fq2 |
|---|---|---|---|---|
CBS11687 |
1 |
ILLUMINA |
resources/reads/SRR7345539_1.fastq.gz |
resources/reads/SRR7345539_2.fastq.gz |
MF46 |
1 |
ILLUMINA |
resources/reads/SRR7345548_1.fastq.gz |
resources/reads/SRR7345548_2.fastq.gz |
MF34 |
1 |
ILLUMINA |
resources/reads/SRR7514423_1.fastq.gz |
resources/reads/SRR7514423_2.fastq.gz |
MF13 |
1 |
ILLUMINA |
resources/reads/SRR7514425_1.fastq.gz |
resources/reads/SRR7514425_2.fastq.gz |
MF54 |
1 |
ILLUMINA |
resources/reads/SRR7514424_1.fastq.gz |
resources/reads/SRR7514424_2.fastq.gz |
If the read files (fq1 and fq2) follow the following naming convention resources/reads/<SRA_ID>_[12].fastq.gz
and they are not actually at the given path, then they will be downloaded from SRA DB automatically.
Reference genome
ref:
# NCBI/ENA/DBJ assembly accession, e.g. GCA_000001405.28
accession: GCF_000185945.1
This part of config.yaml defines which genome is used as the reference for mapping and whose annotation
is used for SNPeff annotation.
Workflow parameters
The following table is automatically parsed from the workflow’s config.schema.y(a)ml file.
Parameter |
Type |
Description |
Required |
Default |
|---|---|---|---|---|
samples |
string |
yes |
||
units |
string |
yes |
||
ref |
yes |
|||
. accession |
string |
yes |
||
filtering |
yes |
|||
. vqsr |
boolean |
yes |
||
. hard |
yes |
|||
. . snvs |
string |
yes |
||
. . indels |
string |
yes |
||
processing |
yes |
|||
. remove-duplicates |
boolean |
yes |
||
. restrict-regions |
string |
|||
. region-padding |
integer |
|||
params |
yes |
|||
. gatk |
yes |
|||
. . HaplotypeCaller |
string |
yes |
||
. . BaseRecalibrator |
string |
yes |
||
. . GenotypeGVCFs |
string |
yes |
||
. . VariantRecalibrator |
string |
yes |
||
. picard |
yes |
|||
. . MarkDuplicates |
string |
yes |
Linting and formatting
Linting results
All tests passed!
Formatting results
1[DEBUG]
2[DEBUG] In file "/tmp/tmp9d09fkwh/workflow/rules/common.smk": Formatted content is different from original
3[DEBUG]
4[INFO] 1 file(s) would be changed 😬
5[INFO] 1 file(s) would be left unchanged 🎉
6
7snakefmt version: 0.11.5