Zubair Khalid

Virologist/Molecular Biologist | Veterinarian | Bioinformatician

Conventional & Molecular Virology • Vaccine Development • Computational Biology

Dr. Zubair Khalid is a veterinarian and virologist specializing in conventional and molecular virology, vaccine development, and computational biology. Dedicated to advancing animal health through innovative research and multi-omics approaches.

Dr. Zubair Khalid - Veterinarian, Virologist, and Vaccine Development Researcher specializing in Computational Biology, Multi-omics, Animal Health, and Infectious Disease Research

Category: Guides

Gatk Germline Variant Calling

Understanding the Gold Standard Pipeline for Inherited Variant Analysis

If you need to identify inherited single nucleotide polymorphisms (SNPs) and small insertions/deletions (indels) from whole genome or whole exome sequencing data, the GATK (Genome Analysis Toolkit) germline variant calling workflow is the most widely adopted and rigorously benchmarked approach. This guide is for bioinformaticians, clinical researchers, and genomic analysts who need a practical, source grounded framework to implement, evaluate, and troubleshoot GATK based germline calling. The core message is simple: follow best practices for preprocessing, use HaplotypeCaller with joint genotyping for cohorts, apply careful filtering, and always validate against known variant databases. Galaxy Training Network offers a hands on introduction to this pipeline if you want to practice on sample data.

The GATK germline variant calling workflow has been refined through years of community use and is explicitly designed to reduce false positives caused by sequencing artifacts and alignment errors. It relies on a Bayesian model that reassigns base quality scores (Base Quality Score Recalibration, BQSR) and uses a local de novo assembly step to call variants. Unlike somatic pipelines that compare tumor to normal, the germline pipeline assumes all samples are from inherited (non mosaic) DNA and expects variants to be present in every cell. NCBI Bookshelf contains several technical primers on variant calling principles that complement the GATK documentation.

At a Glance

Aspect Description
Primary Goal Discover inherited SNPs and small indels from NGS data
Input Requirements Aligned BAM/CRAM files with read group info
Core Tools HaplotypeCaller, GenomicsDBImport, GenotypeGVCFs
Optional but recommended BQSR, Variant Quality Score Recalibration (VQSR)
Output VCF file with genotype likelihoods and filtered variants
Best suited for Diploid organisms, human genome reference builds 37/38
Common Pitfalls Ignoring read group metadata, omitting base recalibration, applying somatic filters to germline data

Core Concepts and Decision Points

Germline versus Somatic Calling

Germline variant calling assumes every cell carries the same genome, so evidence for a variant must come from a consistent fraction of reads (typically 50% for heterozygous calls). Somatic calling, by contrast, looks for variants present at low allele fractions. A comprehensive review of variant calling tools for RNA-seq highlights that the same algorithmic distinctions apply to DNA data: germline callers use diploid assumptions, while somatic callers accommodate subclonal populations.

Why Preprocessing Matters

Raw aligned reads contain systematic errors from base calling, PCR duplicates, and mapping uncertainty. GATK’s best practices mandate three preprocessing steps before variant calling:

  1. Mark duplicates (using Picard or samblaster)
  2. Recalibrate base quality scores (BaseRecalibrator)
  3. Reassemble around indels (IndelRealigner, now handled by HaplotypeCaller internally)

Skipping these steps inflates false positive rates. Performance comparison of germline variant calling tools in sporadic disease cohorts found that pipelines with full preprocessing consistently outperformed those without, especially in low coverage regions.

Single Sample versus Joint Genotyping

For projects with multiple samples, you have two options: call each sample independently and then merge VCFs, or use GATK’s joint genotyping approach. The joint method (HaplotypeCaller with GVCF mode, GenomicsDBImport, GenotypeGVCFs) shares information across samples to improve variant discovery at low coverage sites and to better differentiate true homozygotes from dropouts. GermVarX: A Robust Workflow for Joint Germline Variant Exploration describes a production grade implementation of this strategy that scales to hundreds of whole exomes.

Practical Workflow for Germline Variant Calling

Step 1: Data Acquisition and Quality Control

Obtain raw FASTQ files from a sequencing provider or download from public repositories such as NCBI Sequence Read Archive. Perform initial QC with FastQC and MultiQC. Check read length, per base quality, GC content, and adapter contamination. Trim adapters and low quality bases if necessary (using Cutadapt or Trimmomatic).

Step 2: Alignment and Preprocessing

Align reads to the reference genome (e.g., GRCh38) using BWA MEM. Add read group information (sample, library, platform) because GATK requires it. Sort the BAM file and mark duplicates using MarkDuplicates (Picard). Then run BaseRecalibrator with a set of known variant sites (e.g., dbSNP, Mills indels). Apply the recalibration to produce a BQSR BAM file.

Command example:

gatk BaseRecalibrator \
   -R reference.fa \
   -I sorted_dedup.bam \
   --known-sites known_snps.vcf \
   --known-sites known_indels.vcf \
   -O recal_data.table

Step 3: Germline Variant Discovery

Run HaplotypeCaller in GVCF mode for each sample. GVCF mode writes a record for every genomic position, including non variant sites. This is required for joint genotyping.

gatk HaplotypeCaller \
   -R reference.fa \
   -I recalibrated.bam \
   -O sample.g.vcf.gz \
   -ERC GVCF

Step 4: Joint Genotyping

Import all GVCFs into a GenomicsDB workspace and then genotype the cohort.

gatk GenomicsDBImport \
   -V sample1.g.vcf.gz \
   -V sample2.g.vcf.gz \
   --genomicsdb-workspace-path my_database \
   -L intervals.list

gatk GenotypeGVCFs \
   -R reference.fa \
   -V gendb://my_database \
   -O cohort.vcf.gz

Step 5: Variant Quality Filtering

After joint genotyping, you have two filtering options: Variant Quality Score Recalibration (VQSR) or hard filtering. VQSR requires a robust set of known variants (e.g., HapMap, 1000 Genomes) and is only recommended for datasets with at least 30 samples. For smaller cohorts or exomes, use hard filters:

  • QD (QualByDepth) < 2.0
  • FS (FisherStrand) > 60.0
  • SOR (StrandOddsRatio) > 3.0
  • MQ (RMSMappingQuality) < 40.0
  • MQRankSum < 12.5
  • ReadPosRankSum < 8.0

Apply these with SelectVariants or hard filter annotation. NCBI Bookshelf includes tables of recommended filter thresholds for different variant types.

Step 6: Annotation and Evaluation

Annotate the filtered VCF with functional effect predictors such as SnpEff, VEP, or ANNOVAR. Evaluate transition/transversion ratio, heterozygosity rate, and number of known versus novel variants. Compare against a gold standard set (e.g., NA12878) if available. EMBL EBI Training offers free courses on VCF manipulation and variant interpretation.

Quality Checks and Common Mistakes

Key Quality Metrics

  • Coverage depth at variant sites: at least 10x for confident heterozygous calls, lower depth increases false negatives.
  • Allele balance: for heterozygous calls, the alternative allele fraction should be between 0.2 and 0.8. Deviations suggest mapping errors or copy number variation.
  • Strand bias: high FisherStrand or StrandOddsRatio indicates strand specific artifacts.
  • Cluster bias: variants near the edges of reads or in homopolymer runs should be flagged.

Five Common Mistakes

  1. Omitting read group metadata. GATK uses the read group ID to model sequencing errors and to differentiate samples. Without it, HaplotypeCaller may assign incorrect quality scores.
  2. Calling somatic variants with germline defaults. Tools like Mutect2 have different priors and should not be used for germline calling unless you adjust parameters.
  3. Running HaplotypeCaller on unprocessed BAM files. Base recalibration and duplicate marking are not optional, they directly impact variant quality.
  4. Applying VQSR on fewer than 30 samples. VQSR relies on machine learning and a large training set. For small cohorts, use hard filters.
  5. Ignoring sex chromosomes. The GATK germline workflow assumes diploidy. For male X and Y chromosomes, set the ploidy parameter (e.g., ploidy 1 for X in males). Galaxy Training Network has dedicated tutorials for handling sex chromosomes.

Limitations and Uncertainty

No pipeline is perfect. GATK germline calling assumes a diploid genome, so it treats aneuploidies or large copy number variants as sequencing noise rather than real events. The model also struggles in regions with extreme GC content, repetitive sequences, or low mappability. Furthermore, the quality of known variant databases used for BQSR and VQSR varies by ancestry, over reliance on European centric resources can introduce systematic bias. Discovering, Genotyping, and Annotating Structural Variants with GATK explains that GATK’s primary strength is small variants, and dedicated structural variant callers (e.g., Manta, Delly) should be used for larger events.

Another source of uncertainty is the choice of reference genome. GATK performance differs between hg19 and GRCh38 due to improvements in decoy sequences and alternate contigs. Bioconductor provides packages for liftover and reference comparisons to help you assess these effects.

Finally, false negative rates can be high in regions of low coverage or extreme allele imbalance. Even with best practices, a non negligible fraction of true variants will be missed. Using complementary callers (e.g., FreeBayes, DeepVariant) and taking the intersection or union can increase sensitivity, but at the cost of specificity. A comprehensive review of variant calling tools notes that ensemble approaches are becoming more common in clinical settings.

Frequently Asked Questions

What is HaplotypeCaller and how does it differ from older callers like UnifiedGenotyper?

HaplotypeCaller performs local de novo assembly around regions with evidence of variation. It then realigns reads to these haplotypes and calls variants using a Bayesian likelihood model. This approach handles indels and complex variation much better than the old UnifiedGenotyper, which used a simple pileup model. HaplotypeCaller is now the default germline caller in GATK 4.

Do I always need VQSR?

No. VQSR requires a large training set (at least 30 samples) and a set of high confidence known variants. For single samples or small cohorts, hard filtering (based on annotations like QD, FS, SOR) is more practical and often performs equally well. Performance comparison of germline variant calling tools showed that hard filters with conservative thresholds produce near optimal precision recall tradeoffs for small projects.

Can I use the same GATK pipeline for whole genome and whole exome data?

Yes, but there are differences. Whole exome data has non uniform coverage and limited background, so you may need to adjust the HaplotypeCaller interval list to only target regions. GATK also recommends using the EXOME mode for BaseRecalibrator on exome data to avoid overfitting. Joint genotyping works for both, but exome specific variant databases should be used for filtering.

Are there machine learning based alternatives to GATK hard filters?

Yes, tools like ClouS, Vax, and DeepFilter use random forests or neural networks trained on curated truth sets. However, GATK’s VQSR is itself a machine learning method (Gaussian mixture model). The choice depends on your data size and available computational resources. Discovering, Genotyping, and Annotating Structural Variants with GATK provides a discussion of filtering strategies that includes newer ML approaches.

References and Further Reading

Related Articles