omics.co.in logo omics.co.in

Chapter 6: Step 4 — Variant Calling: Germline vs. Somatic Architecture

Tested Stacks: GATK 4.6.1 Samtools 1.21 Nextflow 24.10 Seurat v5.1 Python 3.12
Prerequisites: Basic Linux CLI & Sequencing Formats
📚 Chapter 6 of 10 0% Course Completed

Chapter 6: Step 4 — Variant Calling: Germline vs. Somatic Architecture

Variant calling is the computational stage that evaluates recalibrated aligned reads against the human reference genome to identify non-reference mutations. As highlighted in our masterclass architecture, variant calling bifurcates fundamentally into two distinct biological tracks: Germline Workflow and Somatic Oncology Workflow.

Step 4 Technical Specifications
  • Input File: Sorted & Recalibrated BAM/CRAM files.
  • Output File: Raw Variant Call Format file (.vcf or .vcf.gz) with Genotype Likelihoods.
  • Clinical Utility: Identifies inherited Mendelian mutations (Germline assuming 0/0, 0/1, 1/1 diploid states) or acquired driver mutations in heterogeneous tumors (Somatic evaluating variant allele fractions down to 1%).

The Two Divergent Workflows: Architectural Comparison

Workflow TypeSample InputBiological AssumptionVariant Callers (SNV/InDel)Variant Callers (CNV/SV)
Path A: GermlineSingle Normal Sample (Blood / Saliva / Buccal Swab)Diploid organism (Heterozygous ~50% VAF, Homozygous ~100% VAF)GATK HaplotypeCaller, Google DeepVariant, FreeBayesGATK gCNV, CNVkit, DELLY, Manta
Path B: SomaticMatched Tumor-Normal Pair OR Tumor-Only SpecimenSubclonal heterogeneity, aneuploidy, low VAF (1% – 30%), stromal contaminationGATK MuTect2, Strelka2, VarScan2FACETS, Control-FREEC, ASCAT, CNVkit

Path A: Germline Calling with GATK HaplotypeCaller & DeepVariant

GATK HaplotypeCaller avoids the pitfalls of single-column pileup callers by performing local de novo micro-assembly:

  1. Identifies candidate Active Regions showing signs of non-reference variation.
  2. Constructs a local de Bruijn graph across the active region to reconstruct candidate haplotypes.
  3. Evaluates read alignments against haplotypes using a PairHMM (Hidden Markov Model) to calculate likelihood matrices.
  4. Emits a Genomic VCF (GVCF) containing statistical records for both variant and invariant sites.
# Germline Variant Calling in GVCF Mode (GATK HaplotypeCaller)
gatk HaplotypeCaller     -R GRCh38.primary_assembly.fa     -I patient_recalibrated.bam     -O patient_germline.g.vcf.gz     -ERC GVCF

# Genotype GVCF to produce standard multi-sample or single-sample VCF
gatk GenotypeGVCFs     -R GRCh38.primary_assembly.fa     -V patient_germline.g.vcf.gz     -O patient_germline.raw.vcf.gz

Path B: Somatic Oncology Calling with GATK MuTect2

Somatic calling differs fundamentally because tumor samples are mixtures of malignant clones, normal stromal cells, and immune infiltrates. A critical driver mutation (e.g. PIK3CA H1047R) may be present at only 3% Variant Allele Frequency (VAF).

# Somatic Variant Calling with Matched Tumor-Normal Pair (GATK MuTect2)
gatk Mutect2     -R GRCh38.primary_assembly.fa     -I tumor_recalibrated.bam     -I normal_recalibrated.bam     -normal NORMAL_SAMPLE_NAME     --germline-resource af-only-gnomad.hg38.vcf.gz     --panel-of-normals pon_1000g_hg38.vcf.gz     -O somatic_raw.vcf.gz

# Filter Somatic Calls for Cross-Sample Contamination and Orientation Bias
gatk FilterMutectCalls     -R GRCh38.primary_assembly.fa     -V somatic_raw.vcf.gz     -O somatic_filtered.vcf.gz
⚠️

Common Pitfalls & Troubleshooting Checklist

  • Java Heap Exhaustion (GATK / Picard): If processes terminate with java.lang.OutOfMemoryError, set your environment variable explicitly: export _JAVA_OPTIONS="-Xmx16g -Djava.io.tmpdir=/tmp".
  • Index Timestamp Mismatch: If tools complain that a BAM index is missing or out of date, regenerate with samtools index -@ 4 sample.bam.
  • Conda Channel Conflicts: Avoid ABI incompatibilities between bioconda and conda-forge by setting strict priority: conda config --set channel_priority strict.
  • Chromosome Naming Contamination: Always verify whether reference FASTA headers use chr1 or 1; divergent naming causes silent alignment drops.
Was this guide helpful to your research?
Help us maintain 100% accurate, peer-reviewed bioinformatics standards.
📝 Propose Edit on GitHub ↗