Bioinflows-Bioversity-CIAT/ont-target-dna-variant-calling
A reproducible Snakemake pipeline for variant calling from multiplexed ONT targeted sequencing data in diploid organisms.
Overview
Latest release: None, Last update: 2026-03-10
Quality control: linting: failed formatting: failed
Wrappers: bio/bcftools/concat bio/gatk/combinegvcfs bio/gatk/genomicsdbimport bio/gatk/genotypegvcfs bio/gatk/haplotypecaller bio/picard/createsequencedictionary bio/samtools/faidx
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/Bioinflows-Bioversity-CIAT/ont-target-dna-variant-calling . --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 apptainer/singularity, use
snakemake --cores all --sdm apptainer
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
This workflow is designed to perform variant calling on target ONT-sequenced regions using the GATK HaplotypeCaller and Clair3. The input data for this workflow includes:
A reference genomes in FASTA format
A text file containing the regions of interest (rois)
A text file containing the paths to the input FASTQ files
Step 1: Reference genome directory
Is requiered create a tab-delimited text file indicating the assembly name (ref_name) and the path to the reference genome (ref_path), as shown below:
ref_name |
ref_path |
|---|---|
hg38 |
/path/to/hg38.fa |
Is important to note that the reference name should be unique and should not contain spaces. You can find an example in .test/config/reference_units.txt.
Step 2: Regions of interest (rois) directory
You need to create a tab-delimited text file indicating the reference genome where the region is relative to (ref_name), the chromosome name (chrom), the start position of the region (pos_i), the end position of the region (pos_e).
ref_name |
chrom |
pos_i |
pos_e |
|---|---|---|---|
hg38 |
chr1 |
1000000 |
2000000 |
Step 3: Fastq files directory
A tab-delimited text file is required to indicate the sample name (sample_id) and the path to the input FASTQ files (fastq_path), as shown below:
sample_id |
fastq_path |
|---|---|
sample1 |
/path/to/sample1.fastq.gz |
sample2 |
/path/to/sample2.fastq.gz |
Step 4: Modify config.yaml
In config/config.yaml, you can find the parameters that can be modified according to your needs. The parameters include:
base_dir: The base directory where the workflow will be executed.sample_units_path: The path to the text file containing the sample names and paths to the input FASTQ files.reference_units_path: The path to the text file containing the reference genome names and paths.interval_units_path: The path to the text file containing the regions of interest.GATKparametersClair3parameters
Workflow parameters
The following table is automatically parsed from the workflow’s config.schema.y(a)ml file.
Parameter |
Type |
Description |
Required |
Default |
|---|---|---|---|---|
sequencing_units_path |
string |
path to sample-sheet TSV file |
Linting and formatting
Linting results
1/tmp/tmpyjh196xb/workflow/rules/common.smk:131: SyntaxWarning: invalid escape sequence '\d'
2 interval_i = "\d+",
3/tmp/tmpyjh196xb/workflow/rules/common.smk:132: SyntaxWarning: invalid escape sequence '\d'
4 interval_e = "\d+",
5KeyError in file "/tmp/tmpyjh196xb/workflow/rules/common.smk", line 103:
6'sample_units_path'
7 File "/tmp/tmpyjh196xb/workflow/rules/common.smk", line 103, in <module>
Formatting results
1[DEBUG]
2<unknown>:1: SyntaxWarning: invalid escape sequence '\d'
3<unknown>:1: SyntaxWarning: invalid escape sequence '\d'
4[DEBUG] In file "/tmp/tmpyjh196xb/workflow/rules/common.smk": Formatted content is different from original
5[DEBUG]
6[DEBUG] In file "/tmp/tmpyjh196xb/workflow/Snakefile": Formatted content is different from original
7[DEBUG]
8[DEBUG] In file "/tmp/tmpyjh196xb/workflow/rules/variant_calling_GATK.smk": Formatted content is different from original
9[DEBUG]
10[DEBUG] In file "/tmp/tmpyjh196xb/workflow/rules/mapping.smk": Formatted content is different from original
11[DEBUG]
12[DEBUG] In file "/tmp/tmpyjh196xb/workflow/rules/basecalling.smk": Formatted content is different from original
13[DEBUG]
14[DEBUG] In file "/tmp/tmpyjh196xb/workflow/rules/ref.smk": Formatted content is different from original
15[DEBUG]
16[DEBUG] In file "/tmp/tmpyjh196xb/workflow/rules/variant_calling_Clair3.smk": Formatted content is different from original
17[INFO] 7 file(s) would be changed 😬
18
19snakefmt version: 0.11.4