b-brankovics/bwa-gatk-fasttree-smkwf

Variant calling workflow for creating SNP phylogenies

Overview

Latest release: None, Last update: 2026-07-03

Share link: https://snakemake.github.io/snakemake-workflow-catalog?wf=b-brankovics/bwa-gatk-fasttree-smkwf

Quality control: linting: passed formatting: failed

Wrappers: bio/bcftools/filter bio/bwa/index bio/bwa/mem bio/fasttree bio/gatk/genomicsdbimport bio/gatk/genotypegvcfs bio/gatk/haplotypecaller bio/gatk/selectvariants bio/gatk/variantfiltration bio/multiqc bio/samtools/faidx bio/sra-tools/fasterq-dump

Workflow Rule Graph

This visualization of the workflow’s rule graph was automatically generated using Snakevision

Rule Graph light

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/b-brankovics/bwa-gatk-fasttree-smkwf . --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.

General settings

To configure this workflow, modify config/config.yaml according to your needs, following the explanations provided in the file.

Workflow overview

The workflow is built using snakemake and consists of the following steps:

  1. Download reference genome from NCBI

  2. Map reads using BWA

  3. Call variants using GATK best practices

  4. Create a MSA (multi sequence alignment) file from VCF/BCF

  5. Run fasttree

The pipeline will jointly call all samples that are defined, following the GATK best practices.

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 metadata

  • samples.tsv - A TSV table that needs to contain at least a sample column 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

For each sample, add one or more sequencing units (runs, lanes or replicates) to the unit sheet config/units.tsv. For each unit, define platform, and either one (column fq1) or two (columns fq1, fq2) FASTQ files (these can point to anywhere in your system). 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/tmpaqicmccw/workflow/rules/common.smk":  Formatted content is different from original
 3[DEBUG] 
 4[WARNING] In file "/tmp/tmpaqicmccw/workflow/rules/mapping.smk":  Keyword "params" at line 31 has comments under a value.
 5	PEP8 recommends block comments appear before what they describe
 6(see https://www.python.org/dev/peps/pep-0008/#id30)
 7[DEBUG] In file "/tmp/tmpaqicmccw/workflow/rules/mapping.smk":  Formatted content is different from original
 8[DEBUG] 
 9[DEBUG] 
10[DEBUG] In file "/tmp/tmpaqicmccw/workflow/rules/qc.smk":  Formatted content is different from original
11[INFO] 3 file(s) would be changed 😬
12[INFO] 1 file(s) would be left unchanged 🎉
13
14snakefmt version: 0.11.5