Chapter 29: The Capstone — Architecting the Clinical Pipeline

Johnson’s Final Principle: The Pipeline IS the Laboratory

In clinical genomics, the pipeline must pass regulatory inspection (CLIA, CAP, ISO 15189). It must survive audits, employee turnover, software deprecation, and hardware failures. If it cannot reproduce yesterday’s result, a patient is misdiagnosed. The pipeline IS the laboratory.


Core Concepts

End-to-End Germline Architecture

The standard clinical germline analysis pipeline follows a modular workflow:

FASTQ → BWA → MarkDuplicates → BQSR → HaplotypeCaller →
Joint Genotyping → VQSR → VEP → ACMG Classification → Report

Each step must be version-pinned, containerized, and parameter-logged:

# Example: version-tracked alignment step
BWA_VERSION="0.7.17"
PICARD_VERSION="2.27.5"
GATK_VERSION="4.4.0.0"

bwa mem -t 16 -K 10000000 -R "@RG\tID:${SAMPLE}\tSM:${SAMPLE}" \
  ${REFERENCE} ${READ1} ${READ2} | \
  gatk MarkDuplicates -I /dev/stdin -O ${SAMPLE}.dedup.bam \
    -M ${SAMPLE}.dedup.metrics

VQSR (Variant Quality Score Recalibration). The pipeline uses a Gaussian mixture model to distinguish true variants from sequencing artifacts. VQSR trains on known truth sites (HapMap, 1000 Genomes, Omni) to learn the multidimensional distribution of variant features — QualByDepth (QD), FisherStrand (FS), StrandOddsRatio (SOR), MappingQuality (MQ), and ReadPosRankSum — then applies this model to score novel variants. A VQSR tranche of 99.9% sensitivity retains nearly all true variants while filtering ~90% of artifacts. Critical limitation: VQSR requires ~50+ training samples with truth sites. For smaller cohorts or non-human species, hard filtering (QD > 2.0, FS < 60.0, MQ > 40.0) replaces VQSR.

Somatic Pipeline Architecture

The somatic pipeline extends the germline framework with a matched normal (Chapter 10) at every step:

Tumor FASTQ + Normal FASTQ → BWA → MarkDuplicates → BQSR → Mutect2 →
FilterMutectCalls (PON) → Cross-sample contamination check →
VEP → Tumorigenic Classification → Report

Mutect2 differs from HaplotypeCaller in three critical ways: it uses the tumor-normal pair to subtract germline polymorphisms, it models cross-sample contamination as a prior on VAF, and it applies a panel of normals (PON) — ~100 normal samples processed identically — to capture site-specific sequencing errors that would otherwise appear as false-positive somatic calls. Without a PON, the somatic pipeline produces 2-5× more false positives, particularly at recurrent artifact hotspots in the genome.

Validation and Regulatory Requirements

CLIA/CAP validation requires measurement of:

  • Accuracy: Concordance with orthogonal method (Sanger sequencing, array) across known reference standards (GIAB NA12878).
  • Precision: Reproducibility across runs, operators, and reagent lots.
  • Limit of detection (LoD): Minimum VAF reliably detected (typically 5-10% for somatic, 20% for germline).
  • Reportable range: The spectrum of variant types the pipeline can detect (SNP, indel, SV, CNV).

The pipeline must demonstrate all four metrics across representative genomic regions — GC-rich regions, segmental duplications, and tandem repeats have systematically lower performance regardless of pipeline.

Data Management and Chain of Custody

Every file requires a checksum (MD5 or SHA-256) recorded at each processing step:

raw FASTQ (SHA256: abc123...) → aligned BAM (SHA256: def456...) →
called VCF (SHA256: ghi789...)

If any checksum changes, the chain of custody is broken, and the result cannot be used for clinical decision-making.

Infrastructure components: compute (SLURM/AWS Batch), storage (S3 with versioning, Glacier for archival), database (variant + sample metadata), workflow engine (Cromwell/Nextflow Tower).

Secondary findings management. The pipeline must explicitly handle the ACMG secondary findings (SF) list — 81 genes where pathogenic variants are actionable regardless of the testing indication. SF analysis runs as a separate pipeline branch with independent quality thresholds and orthogonal confirmation (Sanger sequencing) before reporting. The patient’s opt-in/opt-out consent status must be tracked in the metadata chain — reporting an incidental finding that the patient declined is as serious a regulatory failure as missing a primary finding.

Artificial Intelligence as a Medical Device (SaMD)

The FDA recognizes AI/ML-enabled software as a medical device (SaMD) for clinical genomics. Requirements:

  • Locked model: The model parameters are frozen at the time of regulatory approval.
  • Algorithm Change Protocol (ACP): A pre-specified plan for updating the model without re-submission.
  • Data drift monitoring: Continuous monitoring for changes in data distribution that could degrade model performance (e.g., new sequencing chemistry, different patient population).
  • Ongoing validation: Periodic re-validation against reference standards.

Biological Interpretation

Validation with reference standards (NA12878, GIAB) establishes baseline accuracy, but clinical accuracy varies by genomic region: GC-rich regions, segmental duplications, and tandem repeats have systematically lower performance regardless of pipeline. The pipeline should report per-region confidence intervals, not just global accuracy across the genome.

The duty to reanalyze is an emerging legal and ethical obligation. A VUS classified in 2020 may have sufficient evidence for reclassification by 2025. Labs with automated VUS reanalysis pipelines (2-year cycle) systematically reclassify 5-10% of VUS annually, with the majority being downgraded to Benign. Labs without automated reanalysis are accumulating VUS backlogs that represent potential missed diagnoses.

Every evidence code in an ACMG classification must be traceable to a specific data point — which read, which allele frequency database version, which publication. If this trace is broken, the classification cannot be defended in a regulatory audit.


Current Landscape (Q2 2026)

  • FDA recognizes AI/ML-enabled SaMD for clinical genomics, requiring ongoing monitoring for data drift and an Algorithm Change Protocol for model updates.
  • Automated VUS reanalysis pipelines (2-year cycle) are becoming standard practice in large clinical labs, addressing the growing reclassification backlog.
  • Cloud-based clinical genomics (GCP Healthcare, AWS HIPAA) enables multi-site validation across diverse populations, improving variant classification accuracy in underrepresented groups.
  • ACMG secondary findings list (v3.2, 2024) expanded from 59 to 81 actionable genes, increasing the detection rate of actionable incidental findings.

Summary and Required Reading

  1. CLIA/CAP validation requires accuracy, precision, limit of detection, and reportable range — measured across all genomic contexts.
  2. Chain of custody with checksums at every step ensures auditability — without it, results are not clinically defensible.
  3. AI/ML SaMD requires locked models, Algorithm Change Protocols, and data drift monitoring.
  4. Duty to reanalyze — VUS backlogs grow annually without automated reanalysis pipelines.

Required Reading

  • Roy et al.: “Toward accurate clinical reporting of sequence variants” (Genetics in Medicine, 2020).
  • CLIA guidelines for NGS-based tests (CMS).

Johnson’s Rule: If you cannot trace every evidence code to a specific data point, the classification is not clinically defensible.