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

Somatic Variant Calling Pipeline

A somatic variant calling pipeline identifies mutations that arise in a tissue after conception, such as in cancer or during development. This guide explains the core concepts, decision points, and practical steps for building a reliable pipeline, with a focus on source bounded, reproducible methods. It is intended for bioinformaticians, clinical researchers, and genomics students who need a structured approach to somatic mutation detection using next generation sequencing data. For a foundational walkthrough of alignment and variant calling, the Galaxy Training Network offers hands on tutorials that mirror many of the principles discussed here.

At a Glance

Aspect Key Takeaway
Purpose Identify somatic mutations (e.g., in tumors) distinct from germline variants
Input Data Tumor and matched normal sequencing reads (FASTQ) or aligned BAM files
Core Tools Mutect2, Strelka2, VarScan2, SomaticSniper, FreeBayes (somatic mode)
Critical Pre processing Adapter trimming, alignment with BWA MEM, duplicate marking, base quality recalibration
Artifact Sources FFPE damage, PCR duplicates, sequencing errors, cross contamination
Main Outputs VCF with somatic variants, filtered by panel of normals and blacklists
Key Quality Metric Tumor purity, sequencing depth, variant allele frequency (VAF) distribution

For an authoritative reference on sequencing technology and variant types, consult the NCBI Bookshelf. Many books cover the biology behind mutation calling and the interpretation of somatic events.

Core Concepts

A somatic variant is a DNA change present in a subset of cells but absent from the germline. In cancer genomics, comparing a tumor sample to a matched normal sample (usually blood or adjacent normal tissue) is the standard approach. The pipeline’s goal is to distinguish true somatic mutations from sequencing errors, alignment artifacts, and germline polymorphisms that may be present at low frequency.

Somatic variant calling differs from germline calling because the variant allele fraction can be very low, especially in impure tumors or in liquid biopsies. Recent deep learning methods, such as those described in VariantMedium, use 3D DenseNets trained on experimental data to improve sensitivity for point mutations. Similarly, FFixR addresses the high error rates in FFPE derived RNA sequencing by applying a machine learning framework tailored to formalin fixed samples. These advances highlight the need to choose tools that match your sample type.

Matched normal samples help filter out germline variants. When no matched normal is available, a panel of normals (PoN) from many healthy individuals can provide a statistical background. The EMBL EBI Training resources explain how to build and use such panels in their variant calling module.

Decision Criteria

Selecting a somatic variant caller depends on experimental design, sample type, and desired sensitivity. Key decision points include:

  • Matched normal available? Yes: use Mutect2, Strelka2, or VarScan2. No: use a tumor only caller with a PoN and stringent filtering.
  • Sample type: For FFPE tissues, use tools with built in error suppression (e.g., FFixR) or custom filters for C>T artifacts. For cell free DNA (cfDNA), consider deep learning enhanced error suppression to detect ultra low frequency variants.
  • Indel complexity: FreeBayes in somatic mode can handle complex indels as shown in a simulation based framework. For simple indels, Mutect2 or Strelka2 are robust.
  • Computational resources: Mutect2 is widely used but can be memory intensive. VarScan2 is lightweight but may require additional post processing.
  • Postzygotic or mosaic mutations: In trio studies, such as those examining parental postzygotic mutations, the pipeline must account for low variant fractions and the absence of a matched tumor normal pair. These scenarios demand modified filtering stratagies.

A practical approach is to run two callers (e.g., Mutect2 and Strelka2) and take the intersection or union depending on sensitivity needs. The Bioconductor project provides R packages like VariantAnnotation and SomaticSignatures for comparing and summarizing caller outputs.

Practical Workflow

A typical somatic variant calling pipeline follows these steps.

1. Data Acquisition and Quality Control

Download raw FASTQ files from the NCBI Sequence Read Archive or from your sequencing facility. Assess read quality with FastQC and trim adapters with Trimmomatic or Cutadapt. For FFPE samples, remove soft clipped bases that often carry artifact signals.

2. Alignment

Align reads to a reference genome (GRCh38 or GRCh37) using BWA MEM. Sort and index the BAM file with SAMtools. Mark duplicate reads with Picard MarkDuplicates. PCR duplicates are not somatic variants, their removal prevents false positives.

3. Base Quality Recalibration

Run BaseRecalibrator and ApplyBQSR from GATK. This step corrects systematic errors in base quality scores, which is essential for sensitive somatic calling. If using a caller like Mutect2, recalibration improves specificity.

4. Somatic Variant Calling

Configure your chosen caller. For Mutect2, provide tumor and normal BAMs, a germline resource (e.g., gnomAD), and a PoN. For Strelka2, use the dedicated somatic configuration. Example command for Mutect2:

gatk Mutect2 \
   -R reference.fasta \
   -I tumor.bam \
   -I normal.bam \
   -normal normal_sample_name \
   --germline-resource af-only-gnomad.vcf \
   --panel-of-normals pon.vcf \
   -O somatic.vcf

Run the caller per chromosome or by intervals to improve runtime and memory use.

5. Filtering

After calling, apply filters to remove artifacts. Mutect2 produces a FilterMutectCalls step that applies a learned probability model. Additional hard filters: minimum tumor depth (e.g., 10 reads), minimum alt reads (3), VAF threshold (e.g., 0.01 for cfDNA). The AI driven neoantigen identification review describes how filtering directly affects downstream applications like neoepitope prediction.

6. Annotation and Prioritization

Annotate variants with VEP, ANNOVAR, or SnpEff to obtain gene, consequence, and population frequencies. Prioritize non synonymous, splice site, and frameshift variants. For cancer driver analysis, integrate with tools like Oncotator.

7. Validation

Confirm a subset of calls by orthogonal methods (e.g., Sanger sequencing or error corrected sequencing). For high confidence calls, require support in both forward and reverse strands and a median base quality above 20.

Quality Checks

Implement these quality control checks throughout the pipeline:

  • Contamination estimation: Use VerifyBamID to check cross sample contamination. A contamination rate >2% can produce false somatic calls.
  • Tumor purity and ploidy: Tools like ASCAT or Sequenza estimate purity and copy number, which inform VAF expectations. Low purity reduces sensitivity.
  • BAM metrics: Use Picard CollectInsertSizeMetrics and CollectAlignmentSummaryMetrics. Abnormal insert sizes or high chimeric rates indicate library problems.
  • VCF metrics: After calling, examine the transition / transversion ratio (expected ~2.0 for whole exome, 1.0 for whole genome), the number of singletons, and the VAF distribution. An excess of low VAF calls may indicate FFPE artifacts.

Common Mistakes

  • Using a single caller without cross validation. Each tool has systematic biases. Relying on one caller may miss variants or introduce false positives.
  • Ignoring FFPE artifacts. Formalin fixed samples show high C>T and G>A conversions. Without specialized preprocessing or filtering, the pipeline will report thousands of false somatic mutations.
  • Wrong normal sample. Using an unmatched or related normal sample leads to residual germline contamination. Always use matched normal from the same individual if possible.
  • Setting filters too leniently. In a research context, allowing all low confidence calls often wastes time on false positives. In a clinical setting, it is unacceptable.
  • Skipping base quality recalibration. Many callers assume accurate scores. Without recalibration, sensitivity and specificity suffer.
  • Not accounting for tumor heterogeneity. Subclonal mutations may have VAF well below expected from purity. Use callers that model multiple allelic fractions (e.g., MuTect2 with read orientation bias models).

Limits of Interpretation

Somatic variant calling has inherent limitations. Even with a robust pipeline, you cannot guarantee all true somatic mutations are detected. Variants in repetitive regions, large structural variants, and complex indels often evade standard short read callers. The variant allele frequency is not a direct proxy for clonal fraction without copy number correction.

The interpretation of a somatic variant as a driver mutation requires additional evidence from functional databases (e.g., COSMIC) and cohort frequency. A positive call does not prove biological significance. Conversely, a negative result does not exclude the presence of a mutation below the detection limit. For sensitive detection in liquid biopsy, specialized error suppression as described by tumor naive ctDNA detection can push detection to 0.1% VAF but still misses mutations in low shed tumors.

Always validate critical findings. The field is rapidly evolving, new machine learning based callers may improve accuracy but require careful benchmarking on your specific sample type.

Frequently Asked Questions

1. Can I use a germline variant caller for somatic variants? Germline callers assume variants are present in 50% or 100% of cells. They filter out low allele fraction variants, which is the opposite of what you want. Use dedicated somatic callers that model the tumor normal comparison.

2. What is a panel of normals and how do I build one? A panel of normals (PoN) is a set of BAM or VCF files from healthy individuals processed through the same pipeline. It captures recurrent sequencing artifacts and common germline polymorphisms. Build it by running your caller on normal samples and merging the resulting VCFs with GATK GenomicsDBImport.

3. Why do I get many more calls in tumor only mode? Without a matched normal, germline polymorphisms that happen to be present in the tumor (especially common SNPs) appear as somatic candidates. A PoN and stringent filtering reduce this, but tumor only calling always produces a higher false positive rate.

4. How do I handle FFPE samples in the pipeline? Use FFPE specific tools such as FFixR or preprocess reads with a specialized trimmer. After calling, apply filters that remove C>T and G>A artifacts. Many callers include orientation bias models for FFPE. Also consider using UMI based deduplication.

References and Further Reading

Related Articles