Skip to content

Conventional DNA‐Seq Pipeline

sprokopec edited this page Feb 27, 2026 · 2 revisions

Running individual steps

Sometimes, you may only want to run one or a few steps, rather than the full pipeline (ie, alignment), or you may already have BAMs (aligned elsewhere) and want to run a specific variant calling tool (ie, mutect2).

Note: to process BAMs produced elsewhere, you MUST have the identical reference used for alignment OR be prepared to subset each BAM to contigs present in your desired reference file (ie, you can not process BAMs aligned by TGL using the hg38 reference on H4H [igenome-human/hg38]!!)

In all cases, tools will write individual commands to file: /path/to/output/directory/TOOL/logs/run_tool_step_sample/script.sh

Pre-processing steps

run trim galore to remove adapter sequences from fastq files

perl trim_adapters.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/fastq_dna_config.yaml \
-o /path/to/output/fastq_trimmed \
-b /path/to/output/fastq_trimmed/trimmed_fastq_files.yaml \
-c slurm \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

run fastqc to summarize trimmed fastq QC metrics

perl fastqc.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/fastq_trimmed/trimmed_fastq_files.yaml \
-o /path/to/output/fastqc \
-c slurm \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

run BWA to align to a reference genome

perl bwa.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/fastq_trimmed/trimmed_fastq_files.yaml \
-o /path/to/output/BWA \
-b /path/to/output/BWA/bwa_bam.yaml \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

once BWA has finished, run GATK indel realignment and/or base quality score recalibration (depending on GATK version)

perl gatk.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/BWA/bwa_bam.yaml \
-o /path/to/output/GATK \
-b /path/to/output/GATK/gatk_bam.yaml \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

QC steps

once GATK has finished, get BAM QC metrics, including coverage, contamination estimates and callable bases

perl get_sequencing_metrics.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output/BAMQC \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

Variant calling steps

Germline SNV/INDELs

run GATK's HaplotypeCaller to produce gvcfs


perl haplotype_caller.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output/HaplotypeCaller \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

once HaplotypeCaller has finished, run variant recalibration


perl genotype_gvcfs.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output/HaplotypeCaller \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

once recalibration is complete, annotate and filter using CPSR


perl annotate_germline.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-i /path/to/output/HaplotypeCaller/cohort \
-o /path/to/output/HaplotypeCaller \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

Somatic Variants

run GATK's MuTect2 to produce somatic SNV calls

# Create a panel of normals (germline calls + sequencing artefacts)
# will only run if normal samples are available
perl mutect2.pl \
--create-panel-of-normals \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output/MuTect2 \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

# Generate somatic SNV and INDEL calls
# can be run on T/N pairs or tumour-only samples (using panel of normals)
perl mutect2.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output/MuTect2 \
--pon /path/to/panel_of_normals.vcf { optional if not using the one created here: can also be specified in dna_pipeline_config.yaml if created elsewhere } \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

run SomaticSniper to produce SNV calls

# will only run on T/N pairs
perl somaticsniper.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output/SomaticSniper \
--pon /path/to/panel_of_normals.vcf { optional; can also be specified in dna_pipeline_config.yaml if created elsewhere } \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

SomaticSniper will ONLY run on tumour samples with a matched normal, and will ONLY produce somatic SNV calls (no panel of normals will be generated for this caller). If you wish to perform additional germline filtering, you may provide a panel of normals developed elsewhere.

run VarDict to produce variant calls

# for WXS or smaller, targeted-panel datasets
# can be run on T/N pairs or tumour-only samples (using panel of normals)
perl vardict.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output/VarDict \
--pon /path/to/panel_of_normals.vcf { optional if not using the one created here; can also be specified in dna_pipeline_config.yaml if created elsewhere } \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

run Delly to produce SV calls

# Generate somatic SV calls
# can be run on T/N pairs or tumour-only samples
perl delly.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output/Delly \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

run NovoBreak to produce somatic SV calls

# will only run on T/N pairs
perl novobreak.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output//NovoBreak \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

NovoBreak will ONLY run on tumour samples with a matched normal.

run Pindel to produce somatic INDEL and SV calls

# can be run on T/N pairs or tumour-only samples; requires insert size file from above QC step
perl pindel.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output/Pindel \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

run panelCN.mops to produce somatic CNA calls

# only runs on targeted-panels (seq_type: targeted)
perl panelcn_mops.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output/panelCNmops \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

panelCN.mops will ONLY run if at least one normal sample is provided, but will then run all provided samples (T/N and tumour-only).

run panelMSI to produce MSI estimates

perl panel_msi.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output/panelMSI \
-c slurm \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

run Mavis to annotate Delly, Pindel and NovoBreak SV calls

# can be run on T/N pairs or tumour-only samples
perl mavis.pl \
-t /path/to/dna_pipeline_config.yaml \
-d /path/to/output/GATK/gatk_bam.yaml \
-o /path/to/output/Mavis \
--delly /path/to/delly/directory \
--novobreak /path/to/novobreak/directory \
--pindel /path/to/pindel/directory \
-c slurm \
--remove \
--dry-run { if this is a dry-run } \
--no-wait { if not a dry-run and you don't want to wait around for it to finish }

Clone this wiki locally