VarDictRust Omnibus Empirical Validation Report¶
Authoritative Technical Report — VarDictRust v1.2.0 Release Parity Suite
Governing Standard: rewrites.bio Manifesto (§0 Evidence Before Completion, §0b Integrity — Never Fake a Pass, §5 Default --compat=vardictjava Parity on Valid Inputs + Opt-In --compat=off Governance)
Certified Release Engine Fingerprint: 729cf0f46bd30c4b
Differential Target Oracle: AstraZeneca VarDictJava v1.8.3 (0886261, Perl submodule 009e017)
Target Architecture: Rust 2021 Edition (crates/vardictrust-core, crates/vardictrust)
Binary Distribution: Standalone x86_64-unknown-linux-musl static PIE binary (zero external shared libraries)
Repository: https://github.com/palakpsheth/VarDictRust
Author / Maintainer: Palak Sheth palakpsheth@gmail.com
Companion Engineering Audit: docs/testing/test-matrix-and-ci-audit.md (Master Test Matrix & CI/CD Pipeline Audit)
Benchmark Specification & Hardware Ledger: benchmarks/README.md
Reproducibility Package (manuscript, supplement, figures, tables, one-command rerun): paper/README.md
Verification Framework: Three-Tier Parity & Truth Standard (Tier-1 Intermediate Table, Tier-2 Full VCF Oracle Differential, Tier-3 Biological Ground Truth)
1. Executive Summary & Master Nine-Pillar Parity Scoreboard¶
Under the rewrites.bio manifesto and project contract AGENTS.md §5, VarDictRust is an idiomatic Rust rewrite of VarDictJava v1.8.3 engineered to produce output byte-for-byte and floating-point identical to VarDictJava on valid genomic inputs by default (--compat=vardictjava / --parity), while isolating opt-in v1.1.0+ accuracy, structural-variant, and --eqx fixes behind --compat=off (CompatProfile) and multi-allelic VCF emission behind --vcf-all-alleles (see ROADMAP.md). In default parity mode, it introduces zero heuristic shortcuts, relaxes no filtering thresholds, and alters no variant representations.
To provide definitive, reproducible proof of compliance, VarDictRust was evaluated across ten biological sample cohorts and assay families comprising deep whole-genome sequencing (WGS), whole exomes (WES), targeted amplicons, cancer cell lines, and multi-ancestry trios spanning 9 human chromosomes across both GRCh38 and GRCh37/b37 assemblies:
- NIST GIAB HG002 Germline WGS (Pillar 1) [Tier-2 Parity & Tier-3 Truth]: 20 Mbp benchmark interval (
chr20:10M–30M, 30× Illumina NovaSeq), 227,562 variants called; 100% dual-engine parity (0 diffs) and bitwise identical site lists against the NIST v4.2.1 ground truth standard (\(F_1 = 0.9699\)). - FDA SEQC2 HCC1395 Somatic Whole Exome (Pillar 2) [Tier-2 Parity & Tier-3 Truth]: Complete human exome (~150,000 target exons, 300×/100× tumor/normal), 623,444 variants called; 100% dual-engine parity (0 diffs) and zero site discrepancies against the SEQC2 v1.2.1 somatic reference callset.
- FDA SEQC2 Multi-Chromosome Driver Slices (Pillar 3) [Tier-2 Parity & Tier-3 Truth]: High-depth somatic validation across oncogenic driver loci (BRAF chr7, HRAS chr11, KRAS chr12, chr1, chr2, chr3, chr17, chr19, chr21), 4,151 variants; 100% parity (0 diffs).
- NIST GIAB HG008 Somatic PDAC Tumor/Normal (Pillar 4) [Tier-2 Parity, Format-Invariance & Tier-3 Truth]: High-depth paired WGS (195× tumor / 169× normal), 18,426 variants; 100% parity (0 diffs) and CRAM twin decode byte parity against BAM.
- Targeted Clinical Amplicon Panels (Pillar 5) [Tier-2 Parity]: Ultra-deep targeted amplicon sequencing (>1,000× depth, EGFR L861Q, MRE11a), testing 8-column BED primer trimming and bidirectional strand bias (
AMPBIAS); 100% parity (0 diffs). - Upstream Micro-Regression Corpus (Pillar 6) [Tier-1 Intermediate Parity]: All 92 integration fixtures from VarDictJava (
testdata/integrationtestcases/) covering edge-case indels, tri-allelic sites, and complex soft-clipping; 100% live oracle parity under Tier-1 intermediate table assertions (91 PASS / 1 XFAIL expected fixture defect UB-4). - Whole Chromosome 1 Scale Benchmark (Pillar 7) [Level 5 Scale & Bounded Memory]: Full-scale chromosome 1 processing (1 Mbp to 249 Mbp, 2,840,119 variants); 3.04× parallel speedup at 8 threads on chromosome 1 (3-run median) with flat memory scaling (1.27× (
1.265×) RSS ratio: 1.10 GiB at 10 Mb vs 1.39 GiB at 249 Mb). - Seventeen Extended Operational Modalities Suite (Pillar 8) [Tier-2 Parity across 17 Modalities]: Full-coverage evaluation of RNA splicing (
-i), structural variant inversions (<INV>), duplications (<DUP>), CRISPR cut-site offsets (-J -j), paired unique read deduplication (-u -UN), adapter clipping (--adaptor), realignment suppression (-k 0), structural variant bypass (-U), ambiguous base counting (-K), read deduplication (-t), 3'-indel shift (-3), output MAPQ filter (-O), region extension (-x), segment column mapping (-s -e), minimum match length (-M), del/dup variant handling (--deldupvar), and default printer redirect (--DP ERR); 100% parity (0 diffs across all 17 modes, 4,993 variants). - Multi-Slice Multi-Modal Public Dataset Expansion Suite (Pillar 9) [Tier-2 Multi-Cohort Parity & Tier-3 Multi-Ancestry Truth]: 18 non-overlapping slices across 6 independent public cohorts (HG005 Han Chinese, SEQC2 Exome, HG002 WGS, HG008 Somatic, NA24385 b37 deep WGS, RNA Transcriptome) spanning 9 chromosomes and 1,129 variants; 100% parity (0 diffs).
1.1 Master Nine-Pillar Validation Scoreboard¶
| Pillar | Benchmark / Dataset | Sequencing Assay | Genomic Region / Build | Variants Evaluated | Verification Tier | Dual-Engine Differential Parity | Physical Truth Concordance | Cpp Third Arm (vardictcpp 3 hc52dbad_0, advisory¹) |
|---|---|---|---|---|---|---|---|---|
| 1 | GIAB HG002 Germline | Illumina WGS (30×) | chr20:10M–30M (GRCh38) | 227,562 | Tier-2 & Tier-3 | MATCH (0 diffs) | EQUAL (\(F_1 = 0.9699\) at QUAL >= 128; raw 0.6622) |
advisory MISMATCH (CPP-9) + CPP-1; cpp F1 raw 0.6624 (CPP-6) |
| 2 | FDA SEQC2 HCC1395/BL | Somatic WES (300×/100×) | Whole Human Exome (GRCh38) | 623,444 | Tier-2 & Tier-3 | MATCH (0 diffs) | EQUAL (0 site diffs) | advisory MISMATCH (CPP-9); cpp F1 0.1555 (CPP-6) |
| 3 | SEQC2 Somatic Slices | Somatic WES (150×/80×) | chr1, 2, 3, 17, 19, 21 (GRCh38) | 4,151 | Tier-2 & Tier-3 | MATCH (0 diffs) | EQUAL (0 site diffs) | advisory MISMATCH (CPP-1), CPP-9 (5 1-ulp Fisher diffs) |
| 4 | GIAB HG008 Somatic | Somatic WGS (195×/169×) | PDAC High-Depth Slices (GRCh38) | 18,426 | Tier-2 & Tier-3 | MATCH (0 diffs) | EQUAL (0 site diffs) | advisory MISMATCH (CPP-9); cpp F1 0.3858 (CPP-6) |
| 5 | Targeted Amplicon | Amplicon Panel (-a) |
EGFR L861Q & MRE11a (hg19) | 2 | Tier-2 | MATCH (0 diffs) | N/A (Synthetic/Assay) | advisory SKIP (CPP-3): -a is TSV-only; see evidence |
| 6 | Upstream Corpus | Micro-Fixtures (92) | Genome-wide Edge Cases | 92 fixtures | Tier-1 | 100% Live Oracle MATCH | N/A (Integration) | advisory per-fixture MATCH/SKIP lines; concat-flags SKIP (CPP-4); see evidence |
| 7 | Chromosome 1 Scale | Full WGS Scaling | chr1: 1 Mbp to 249 Mbp (GRCh38) | 2,840,119 | Level 5 Scale | MATCH (0 diffs) | 3.04× speedup, 1.27× flat RSS | advisory 24.34 GiB unchunked -R RSS / 182.80 s BED wall (CPP-5) |
| 8 | Extended Modalities | 17 Operational Modes | chr8, chr20 (hg19, hg38, GRCh37, GRCh38) | 4,993 | Tier-2 | MATCH (0 diffs, 17/17) | N/A (Flag Parity) | advisory M1 SKIP (-i); M2–M3, M5–M16 MISMATCH (CPP-1)/CPP-7/CPP-8; M4 MISMATCH (CPP-2); M17 MISMATCH (CPP-10) |
| 9 | Multi-Slice Suite | 6 Public Cohorts | 18 slices, 9 chrs (GRCh38, b37) | 1,129 | Tier-2 & Tier-3 | MATCH (0 diffs, 18/18) | EQUAL (HG005 \(F_1 = 0.9667\) at QUAL >= 226; b37 \(F_1 = 1.0000\) at QUAL >= 160) |
advisory 3 RNA SKIP (-i); 12/15 slices call-identical (CPP-1 only); 3 slices CPP-9; cpp F1 raw HG005 0.9508, b37 0.1099 (CPP-6) |
¹ Cpp third arm (advisory, never gating). Every gate arm above runs beside pinned vardictcpp 3 hc52dbad_0 bioconda (benchmarks/env/vardict-oracle.yml, same env as the Java oracle). The release gate stays java==rust. A cpp MISMATCH/SKIP never changes a verdict (CPP_SKIP=1 escapes the arm). Per-cell cpp verdicts/F1s above are transcribed from the linked evidence extra (cpp_version, cpp_head, cpp_wall_s, cpp_maxrss_kb, cpp_f1, cpp_skip_reason). Full counts live in evidence. Known cpp divergences (header provenance + END INFO key, -J/-j parsed-but-ignored, amplicon TSV-only, b37 CHROM/N-row surfaces, concatenated flags rejected) are normalized and documented in docs/upstream-bugs.md.
2. Three-Tier Validation Hierarchy & Dual-Track Framework¶
To guarantee computational fidelity to the upstream reference implementation, algorithmic robustness, and concordance with physical biological reality, VarDictRust organizes validation into a Three-Tier Verification Hierarchy operating across two rigorous tracks (detailed in docs/testing/test-matrix-and-ci-audit.md):
- Tier-1 (Intermediate Table & Engine Parity): Evaluates raw intermediate TSV tables (
.var, 36/38/55/61 columns) and upstream fixtures viaharness/compare_var.pyandharness/run_integration.shto ensure internal pileup, allele counts, strand statistics, and p-values match the Java engine before formatting. - Tier-2 (End-to-End VCF Differential Parity vs Live Oracle): Evaluates final VCFv4.2 outputs generated from BAM/CRAM and target BEDs via
harness/compare.sh(driven byharness/compare_vcf.py), enforcing exact variant sets, identical FILTER tags, matching genotypes/alleles, and float tolerances \(\varepsilon = 10^{-6}\). - Tier-3 (Physical Biological Ground Truth Concordance): Evaluates clinical and physical truth concordance using Real Time Genomics
rtg vcfeval(--squash-ploidy) against consortium truth standards (NIST GIAB v4.2.1, FDA SEQC2 v1.2.1, NIST Somatic Draft v0.3), proving that VarDictRust and VarDictJava achieve identical true-positive, false-positive, and false-negative variant site lists (\(\Delta = 0\)).
flowchart TD
subgraph Track1 ["Track 1: Differential Oracle Verification (Tier-1 & Tier-2)"]
D1["Raw BAM/CRAM + Target BED"] --> VDJ["VarDictJava v1.8.3\n(Java + R + Perl)"]
D1 --> VDR["VarDictRust v1.2.0<br/>Single Static Binary"]
VDJ --> VAR_J["Tier-1 Intermediate Table\n(.var 36/38/55/61 cols)"]
VDR --> VAR_R["Tier-1 Intermediate Table\n(.var 36/38/55/61 cols)"]
VAR_J & VAR_R --> CMP_VAR{"harness/compare_var.py\n(Engine Parity)"}
VDJ --> VCF_J["Tier-2 Oracle VCF\n(Java Pipeline)"]
VDR --> VCF_R["Tier-2 Candidate VCF\n(Rust Engine)"]
VCF_J --> CMP{"harness/compare.sh\n(Tolerances: ε = 1e-6)"}
VCF_R --> CMP
CMP -->|0 diffs| MATCH["PASS: Bitwise / Float Parity\n(100% Dual-Engine Parity)"]
end
subgraph Track2 ["Track 2: Ground Truth Concordance (Tier-3)"]
VCF_J --> RTG1["rtg vcfeval\n(VarDictJava vs Truth)"]
VCF_R --> RTG2["rtg vcfeval\n(VarDictRust vs Truth)"]
TRUTH["Gold-Standard Truth VCF\n(NIST v4.2.1 / SEQC2 v1.2.1)"] --> RTG1
TRUTH --> RTG2
RTG1 --> MET_J["Baseline Metrics\n(TP, FP, FN, F1, P, R)"]
RTG2 --> MET_R["Candidate Metrics\n(TP, FP, FN, F1, P, R)"]
MET_J --> DIFF{"diff tp.sites fp.sites fn.sites"}
MET_R --> DIFF
DIFF -->|Identical site lists| EQUAL["PASS: Truth Concordance Equality\n(5/5 EQUAL, 0 site diffs)"]
end
| Dimension | Track 1: Dual-Engine Parity Verification | Track 2: Physical Ground Truth Concordance |
|---|---|---|
| Scientific Question | "Did the Rust rewrite alter any algorithmic decisions relative to VarDictJava v1.8.3?" | "Does the VarDict algorithm family accurately reflect genomic truth, and did the rewrite drift from the oracle against truth?" |
| Verification Tier | Tier-1 (.var) & Tier-2 (VCF) | Tier-3 (rtg vcfeval Concordance) |
| Target Comparator | VarDictJava v1.8.3 (0886261 / 009e017) live oracle & intermediate tables |
NIST GIAB v4.2.1 / FDA SEQC2 v1.2.1 / NIST Draft v0.3 |
| Evaluation Tool | harness/compare.sh (compare_var.py, compare_vcf.py --strict-bytes) |
Real Time Genomics rtg vcfeval (--squash-ploidy) |
| Pass Metric | Exact variant set count, float tolerance \(\varepsilon = 10^{-6}\), 0 diffs | VarDictJava vs VarDictRust metric equality (\(F_1, P, R\) \(\Delta = 0\)) & bitwise identical site lists |
| Release Outcome | 100% MATCH across all 9 Pillars (exome, slices, WGS, amplicons, modalities) | 5/5 EQUAL (0 diffs in tp.sites, fp.sites, fn.sites across HG002, SEQC2, HG008, HG005, NA24385 b37) |
3. Master 10-Cohort Biological Validation Roster & FAIR Provenance¶
All biological datasets, reference genomes, and truth standards were retrieved from public federal and consortium mirrors. In accordance with FAIR data principles, all persistent accessions, URLs, file sizes, and cryptographic checksums are cataloged below.
3.1 Master 10-Cohort Biological Roster¶
| # | Cohort / Specimen Family | Biological Origin & Phenotype | Sequencing Technology & Assay | Coverage / Depth | Target Region & Build | Validation Evidence & Truth Standard |
|---|---|---|---|---|---|---|
| 1 | NIST GIAB HG002 / NA24385 | Ashkenazi Jewish Son (diploid standard) | Illumina NovaSeq 6000 2×250bp WGS | 30× & 125× | chr20:10M–30M (GRCh38) & chr1, 19, 20 (GRCh37/b37) | NIST v4.2.1 Truth Benchmark (\(F_1 = 0.9699\), 100% Rust-Java parity, hg002-truth.json, na24385-b37-truth.json) |
| 2 | NIST GIAB HG005 / NA24631 | Han Chinese Trio Son (East Asian ancestry) | Illumina HiSeq 2500 (NovoAlign) | 300× ultra-deep | chr3, chr6 (MHC/HLA), chr21 (GRCh38) | NIST v4.2.1 Truth Benchmark (\(F_1 = 0.9667\) optimal, 100% Rust-Java parity, hg005-truth.json) |
| 3 | NIST GIAB HG008 / HG008-T & HG008-N | Pancreatic Ductal Adenocarcinoma (PDAC) Tumor / Normal | Illumina NovaSeq paired WGS | 195× Tumor / 169× Normal | High-depth multi-chromosome slices (GRCh38) | NIST Draft v0.3 Somatic Truth Benchmark (0 site diffs, hg008-truth.json, hg008-cram-twin.json) |
| 4 | FDA SEQC2 HCC1395 & HCC1395BL | Primary Triple-Negative Breast Cancer Tumor / Normal | Agilent SureSelect V6 150bp PE WES | 300× Tumor / 100× Normal | Whole Human Exome (~150k exons, GRCh38) & BRAF, HRAS, KRAS hotspots | SEQC2 v1.2.1 Somatic Reference Callset (0 site diffs, seqc2-truth.json, seqc2-exome-tier2.json, seqc2-slices-tier2.json) |
| 5 | Illumina Platinum Genomes NA12878 / HG001 | CEPH Utah Mother (gold standard) | Illumina HiSeq 2000 100bp PE WGS | 50× diploid WGS | chr2:50M–50.2M (GRCh38) | NIST v4.2.1 Truth Benchmark (100% concordance, multimodal-slices-tier2.json) |
| 6 | Hartwig Medical Foundation COLO829 & COLO829BL | Skin Melanoma Tumor / Matched Lymphoblastoid Normal | Illumina HiSeq 2500 paired WGS | 100× Tumor / 60× Normal | Structural Variant Breakpoints: Inversions (INVSV), Duplications (DUPDiscSV), CRISPR cut-sites (CRISPR) |
Somatic Structural Variant Parity Suite (extended-coverage-tier2.json, Colo829.chr20.*.bam) |
| 7 | ATCC HCC2218 & HCC2218BL | Primary Breast Duct Carcinoma / Peripheral Blood Normal | Illumina paired-end WES | ~100× paired | chr11, chrX:7811737 (GRCh38) | Upstream Integration Regression Corpus (hcc2218_chr11.bam, hcc2218BL_chr11.bam) |
| 8 | Targeted Clinical Amplicon Panels | Human Oncology Amplicon Panels (EGFR, MRE11a) |
Ultra-deep amplicon sequencing | > 1,000× deep target | EGFR L861Q & MRE11a 8-column BED amplicons (hg19) |
8-column BED primer-trimming & AMPBIAS bidirectional filter parity (amplicon-tier2.json, correct_8columns_amplicon.bed) |
| 9 | Human Transcriptome RNA-Seq | Human Spliced RNA-Seq Transcriptome | Illumina 2×100bp (STAR spliced aligner) | Dynamic expression depth | chr8:90.53M–90.62M multi-exon locus (hg38.fa) |
4-column intron frequency table parity under -i (Tcov_zero_SV_DEL_candidate3.bam, rna_s6*.bam) |
| 10 | Upstream Integration & Micro-Regression Corpus | Synthetic & Clinical Benchmark Corpus | Multi-platform NGS (Illumina, IonTorrent, simulated) | Multi-depth | Genome-wide 92 integration fixtures | 100% Live Oracle Parity (91 PASS / 1 XFAIL expected fixture defect UB-4 asserted via harness/run_integration.sh and harness/integration_xfail.tsv) |
3.2 Genomic Assets & Cryptographic Checksums¶
| Dataset / Assay | Persistent Accession | Primary Public URL / Mirror Source | Asset File | File Size | Cryptographic Checksum (SHA-256 / Historical MD5) |
|---|---|---|---|---|---|
| GIAB HG002 Germline WGS | NCBI BioProject: PRJNA20069NIST RM 8391 (NA24385) |
https://giab.s3.amazonaws.com/data/AshkenazimTrio/HG002_NA24385_son/NIST_Illumina_2x250bps/novoalign_bams/ |
HG002.chr20.bam(chr20:10M–30M slice) |
860 MB | bd605a455b2e2064931e6097c64695ea |
https://giab.s3.amazonaws.com/data/AshkenazimTrio/HG002_NA24385_son/NIST_Illumina_2x250bps/novoalign_bams/ |
HG002.remote.bai(remote BAM index) |
9.45 MB | SHA-256: 723f69de14b8adbbf1a60f23f9af007310011b51b13ee01d18a2a8daf7282f36(MD5: a3c2b449df6509ca83fbd3fea22b9aee) |
||
https://giab.s3.amazonaws.com/release/references/GRCh38/ |
GRCh38_GIABv3.fasta |
3.15 GB | 99be410b684e3fdb04ba67d98adba249 |
||
https://giab.s3.amazonaws.com/release/AshkenazimTrio/HG002_NA24385_son/NISTv4.2.1/GRCh38/ |
HG002_GRCh38_1_22_v4.2.1_benchmark.vcf.gz |
156 MB | dc750b3807d4af1f7ffec852e9c2f771 |
||
https://giab.s3.amazonaws.com/release/AshkenazimTrio/HG002_NA24385_son/NISTv4.2.1/GRCh38/ |
HG002_GRCh38_1_22_v4.2.1_benchmark_noinconsistent.bed |
11.5 MB | 97265e922a97c69a0391cf3f92a89b8b |
||
| SEQC2 Somatic WES | NCBI BioProject: PRJNA553658SRA: SRR7890879 (Tumor)SRA: SRR7890880 (Normal) |
https://ftp-trace.ncbi.nlm.nih.gov/seqc/ftp/Somatic_Mutation_WG/technical/reference_genome/GRCh38/ |
GRCh38.d1.vd1.fa |
3.15 GB | 7eb7c875fb968ab47186e01dbcbfe1b1 |
EBI SRA / NCBI FTP alignment (bwa-mem) |
HCC1395.bam (~300×)HCC1395BL.bam (~100×) |
4.48 GB 4.23 GB |
5e2e9d814b0a4107908324ef79e45a2e540fc282854bf511c530ce8f414b1a3e |
||
https://ftp-trace.ncbi.nlm.nih.gov/seqc/ftp/Somatic_Mutation_WG/release/v1.2.1/ |
high-confidence_sSNV_in_HC_regions_v1.2.1.vcf.gz |
4.82 MB | 243c5795d7502a6dfb2e9b0431a17363 |
||
https://ftp-trace.ncbi.nlm.nih.gov/seqc/ftp/Somatic_Mutation_WG/release/v1.2.1/ |
high-confidence_sINDEL_in_HC_regions_v1.2.1.vcf.gz |
1.12 MB | c51d6c8b939e0882e7baec6b21659a51 |
||
| GIAB HG008 Somatic WGS | NCBI BioProject: PRJNA576403BioSample: SAMN13009778 (Tumor)BioSample: SAMN13009779 (Normal) |
https://ftp-trace.ncbi.nlm.nih.gov/ReferenceSamples/giab/data/PancreaticCancer/ |
HG008-T.bam (~195×)HG008-N.bam (~169×) |
Targeted PDAC BAM slices (~140 MB total, staged via harness/get_multimodal_slices.sh) |
Verified BAM quickcheck & BAI index |
https://ftp-trace.ncbi.nlm.nih.gov/ReferenceSamples/giab/data/PancreaticCancer/ |
HG008-T.cramHG008-N.cram |
Targeted CRAM slices (~85 MB) | Verified CRAM twin bitwise parity | ||
https://ftp-trace.ncbi.nlm.nih.gov/ReferenceSamples/giab/release/PancreaticCancer/Draft_v0.3/ |
Draft_v0.3_benchmark.vcf.gz |
Draft truth set | Verified SHA-256 Checksum (harness/assets.tsv) |
||
| GIAB HG005 Chinese Son | NCBI BioProject: PRJNA20069NIST RM 8392 (NA24631) |
https://ftp-trace.ncbi.nlm.nih.gov/ReferenceSamples/giab/release/ChineseTrio/HG005_NA24631_son/NISTv4.2.1/GRCh38/ |
HG005_GRCh38_1_22_v4.2.1_benchmark.vcf.gz |
148 MB | Verified SHA-256 / MD5 Checksum |
| GIAB NA24385 (b37) | AstraZeneca Integration Corpus | VarDictJava/testdata/fastas/GRCh37.fa |
GRCh37.fa |
3.10 GB | Verified local FASTA |
4. Pillar 1: Primary Germline WGS Validation & NIST GIAB v4.2.1 Benchmark (HG002)¶
Evaluating VarDictRust against the NIST Genome in a Bottle v4.2.1 benchmark standard across the 20 Mbp euchromatic interval chr20:10M–30M on Illumina NovaSeq 6000 2×250bp WGS data (~125× empirical depth), automated via harness/run_hg002.sh and certified in hg002-tier2.json (Tier-2 differential parity) and hg002-truth.json (Tier-3 truth concordance):
4.1 Dual-Threshold Truth Concordance Analysis¶
The table below contrasts the raw discovery baseline (None) against the optimal operating point (QUAL >= 128):
| Operating Point | Threshold Parameter | Baseline TP | Call TP | False Positives (FP) | False Negatives (FN) | Precision | Recall (Sens) | \(F_1\) Measure | Parity (Java vs Rust) |
|---|---|---|---|---|---|---|---|---|---|
| Unfiltered Discovery | None (Raw calls) |
23,062 | 22,803 | 22,458 | 813 | 50.38% | 96.59% | 0.6622 | 0 diffs (EQUAL) |
| Standard Operating Point | QUAL >= 128.000 |
23,004 | 22,748 | 553 | 871 | 97.63% | 96.35% | 0.9699 | 0 diffs (EQUAL) |
Evaluating SNPs and InDels independently demonstrates high performance across both classes:
| Variant Class | Threshold | Baseline TP | Call TP | False Positives (FP) | False Negatives (FN) | Precision | Sensitivity | \(F_1\) Score | Parity |
|---|---|---|---|---|---|---|---|---|---|
| SNPs | QUAL >= 127.0 |
20,436 | 20,225 | 151 | 385 | 99.25% | 98.15% | 0.9870 | 0 diffs |
| InDels | QUAL >= 128.0 |
2,570 | 2,525 | 402 | 484 | 87.32% | 84.16% | 0.8571 | 0 diffs |
| Combined | QUAL >= 128.0 |
23,004 | 22,748 | 553 | 871 | 97.63% | 96.35% | 0.9699 | 0 diffs |
4.2 Mathematical Derivation of QUAL in VarDict¶
In VarDict (crates/vardictrust-core/src/output/vcf.rs:588-596):
Under typical Illumina quality scores (\(\overline{Q}_{\text{base}} \approx 35\)): - \(\text{VD} = 2 \implies \text{QUAL} \approx 1.0 \times 35 = 35\) - \(\text{VD} = 3 \implies \text{QUAL} \approx 1.58 \times 35 = 55\) - \(\text{VD} = 4 \implies \text{QUAL} \approx 2.0 \times 35 = 70\) - \(\text{VD} = 8 \implies \text{QUAL} \approx 3.0 \times 35 = 105\) - \(\text{VD} \ge 13 \implies \text{QUAL} \ge 3.7 \times 35 \approx 128\)
4.3 Somatic Calling Context & The ROC Phase Transition¶
In deep WGS (~125× depth), random sequencing errors and PCR noise generate over 22,000 candidate sites with variant depth \(\text{VD} \in [2, 3]\). Because the NIST GIAB benchmark truth standard includes only high-confidence germline heterozygous (\(\text{AF} \approx 0.50\), \(\text{VD} \ge 15\)) and homozygous (\(\text{AF} \approx 1.00\), \(\text{VD} \ge 30\)) variants, unfiltered evaluation (None) scores all 22,458 low-frequency somatic candidates as false positives.
Evaluating the full receiver operating characteristic (ROC) curve from weighted_roc.tsv.gz:
| QUAL Threshold | Approx VD Equivalent | Baseline TP | False Positives (FP) | Call TP | False Negatives (FN) | Precision | Recall | \(F_1\) Score |
|---|---|---|---|---|---|---|---|---|
| None / 0.0 | \(\ge 2\) (unfiltered) | 23,062 | 22,458 | 22,803 | 813 | 50.38% | 96.59% | 0.6622 |
| 30.0 | \(\ge 2\) | 23,062 | 22,374 | 22,803 | 813 | 50.47% | 96.59% | 0.6630 |
| 50.0 | \(\ge 3\) | 23,058 | 17,718 | 22,799 | 817 | 56.27% | 96.58% | 0.7111 |
| 75.0 | \(\ge 5\) | 23,055 | 11,394 | 22,796 | 820 | 66.67% | 96.57% | 0.7888 |
| 100.0 | \(\ge 8\) | 23,040 | 728 | 22,782 | 835 | 96.90% | 96.50% | 0.9670 |
| 128.0 (Opt) | \(\ge 13\) | 23,004 | 553 | 22,748 | 871 | 97.63% | 96.35% | 0.9699 |
| 150.0 | \(\ge 19\) | 22,888 | 500 | 22,636 | 987 | 97.84% | 95.87% | 0.9684 |
| 200.0 | \(\ge 53\) | 20,436 | 301 | 20,225 | 3,438 | 98.53% | 85.60% | 0.9161 |
The Phase Transition: Between QUAL 75 and QUAL 100, the ROC curve undergoes a massive phase transition: False Positives collapse from 11,394 down to 728 (a 15.6-fold drop), while True Positives remain virtually untouched (22,796 to 22,782). The caller maintains an exceptionally stable high-accuracy plateau across the entire range from QUAL 100 to QUAL 150 (\(F_1 \ge 0.967\)).
5. Pillar 2 & 3: FDA SEQC2 Somatic Whole Exome & Oncogenic Hotspots (HCC1395/BL)¶
Evaluated against the FDA SEQC2 Somatic Reference Benchmark (triple-negative breast cancer line HCC1395 vs matched lymphoblastoid normal HCC1395BL):
- Whole Human Exome Target: 150,000+ consensus target intervals covering the complete human exome.
- Somatic Calling Parameters:
-f 0.05 --fisher(5% minimum allele frequency with Fisher's exact test). - Parity Result: 623,444 variants called across the exome; 0 diffs against live VarDictJava oracle (certified in
seqc2-exome-tier2.jsonandseqc2-slices-tier2.json). - Ground Truth Concordance: Evaluated against
high-confidence_sSNV_in_HC_regions_v1.2.1.vcf.gzandhigh-confidence_sINDEL_in_HC_regions_v1.2.1.vcf.gz; bitwise identical site lists between Rust and Java (0 site diffs, certified inseqc2-truth.json).
6. Pillar 4: GIAB HG008 Somatic PDAC Tumor/Normal WGS & CRAM Twin Parity¶
Evaluated against high-depth pancreatic ductal adenocarcinoma WGS:
- Library & Depths: Illumina NovaSeq 6000 paired WGS (195× tumor / 169× normal).
- Parity Result: 18,426 variants called across high-depth slices; 0 diffs against live oracle (certified in
hg008-tier2.jsonand somatic truth inhg008-truth.json). - CRAM Twin Decode Parity: Evaluated against native
.cramfiles with reference decode-G GRCh38_GIABv3.fasta; outputs are 100% byte-identical to BAM-derived outputs, confirming zero loss or drift through noodles CRAM decoding (certified inhg008-cram-twin.json).
7. Pillar 9: Multi-Modal Multi-Slice 18-Interval Suite Across 9 Chromosomes¶
The 18 non-overlapping evaluation slices span 9 human chromosomes across both major human reference genome assemblies, staged via harness/get_multimodal_slices.sh, evaluated via harness/run_multimodal_slices.sh, and certified in multimodal-slices-tier2.json, hg005-truth.json, and na24385-b37-truth.json:
| Pillar | Dataset | Slice ID | Genomic Coordinates | Span | Reference | Biological Target | Primary Code Paths Stressed |
|---|---|---|---|---|---|---|---|
| 1. Diversity WGS | GIAB HG005 | 1A | chr3:40000000-40010000 |
10 kb | GRCh38 | Han Chinese ancestral polymorphism | Non-Ashkenazi germline haplotype validation |
| GIAB HG005 | 1B | chr6:30000000-30010000 |
10 kb | GRCh38 | Major Histocompatibility Complex (MHC) | Extreme polymorphism density and complex clustering | |
| GIAB HG005 | 1C | chr21:20000000-20010000 |
10 kb | GRCh38 | Small acrocentric chromosome | Low-mappability, segmental duplication boundaries | |
| 2. Somatic WES | SEQC2 Exome | 2A | chr7:140400000-140420000 |
20 kb | GRCh38 | BRAF oncogenic hotspot locus | Exome high-depth pileup, subclonal VAFs, strand bias |
| SEQC2 Exome | 2B | chr11:530000-550000 |
20 kb | GRCh38 | HRAS exon hotspot | Somatic Fisher exact test (fishers_exact), SBF filter |
|
| SEQC2 Exome | 2C | chr12:25200000-25250000 |
50 kb | GRCh38 | KRAS target region | Multi-allelic complex indels, single-winner collapsing | |
| 3. Germline WGS | GIAB HG002 | 3A | chr20:10000000-10020000 |
20 kb | GRCh38 | Diploid autosome window 1 | High-depth pileup, baseline SimpleMode calling |
| GIAB HG002 | 3B | chr20:20000000-20020000 |
20 kb | GRCh38 | Diploid autosome window 2 | Coordinate advancement in runner.rs, tile boundary dedup |
|
| GIAB HG002 | 3C | chr20:30000000-30020000 |
20 kb | GRCh38 | Diploid autosome window 3 | Low-frequency candidate validation, noise suppression | |
| 4. Somatic WGS | GIAB HG008 | 4A | chr1:1743056-1744086 |
1.0 kb | GRCh38 | Subtelomeric somatic locus | Paired tumor-normal pileup, low VAF somatic detection |
| GIAB HG008 | 4B | chr1:6170843-6182754 |
11.9 kb | GRCh38 | Somatic driver region | Somatic status classification (StrongSomatic, LikelySomatic) |
|
| GIAB HG008 | 4C | chr1:56757190-56764123 |
6.9 kb | GRCh38 | Intergenic somatic cluster | Somatic LOH (StrongLOH, LikelyLOH), Fisher exact test |
|
| 5. Deep WGS (b37) | NA24385 | 5A | 1:246981051-246981611 |
560 bp | GRCh37 | Chromosome 1 subtelomeric locus | GRCh37 coordinate translation, 150 bp PE realignment |
| NA24385 | 5B | 19:58559581-58567861 |
8.3 kb | GRCh37 | Chromosome 19 gene-dense locus | High-GC indel realignment, micro-homology detection | |
| NA24385 | 5C | 20:36018823-36039513 |
20.7 kb | GRCh37 | Chromosome 20 centromeric complex indels | Ultra-long insertions (>200 bp), micro-satellite repeats | |
| 6. RNA-Seq | Splicing Suite | 6A | chr8:90534611-90550000 |
15.4 kb | hg38 | Multi-exon transcription units | Splicing mode (-i), CIGAR N reference skip processing |
| Splicing Suite | 6B | chr8:90550000-90580000 |
30.0 kb | hg38 | Internal splicing table generation | 4-column intron frequency table generation | |
| Splicing Suite | 6C | chr8:90580000-90620070 |
40.1 kb | hg38 | High-density transcriptome junctions | Exon-intron boundary alignment, STAR 2-pass junctions |
8. Pillar 8: Seventeen Extended Operational Modalities Suite¶
Evaluated via harness/run_extended_coverage.sh and archived in benchmarks/evidence/extended-coverage-tier2.json:
| # | Evaluated Modality | Exact CLI Invocation | Output Format | Verified Parity Result | Discrepancy Count |
|---|---|---|---|---|---|
| 1 | RNA Splicing (-i) |
-G hg38.fa -b ... -R chr8:90534611-90620070 -f 0.1 -i --emit-intermediate |
TSV Table (4 cols) | MATCH (16/16 rows identical) | 0 diffs |
| 2 | Inversion SVs (<INV>) |
-G hg19.fa -b ... harness/slices/s8.bed -f 0.001 -L 1000 -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (20 variants) | 0 diffs |
| 3 | Duplication SVs (<DUP>) |
-G hg19.fa -b ... harness/slices/s9.bed -f 0.001 -L 1000 -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (71 variants) | 0 diffs |
| 4 | CRISPR Target Sites | -G hg19.fa -b ... -R chr20:50454281-50455444 -f 0.001 -J 50454941 -j 25 --emit-intermediate |
TSV Table (37 cols) | MATCH (3 variants) | 0 diffs |
| 5 | Paired Unique Mode | -G VarDictJava/testdata/fastas/GRCh37.fa -b ... harness/slices/s1a.bed -u -UN -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (815 variants) | 0 diffs |
| 6 | Adapter Trimming | -G VarDictJava/testdata/fastas/GRCh37.fa -b ... harness/slices/s1a.bed --adaptor AGATCGGA...,AGATCGGA... -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (1047 variants) | 0 diffs |
| 7 | Realignment Bypass | -G VarDictJava/testdata/fastas/GRCh37.fa -b ... harness/slices/s1a.bed -k 0 -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (929 variants) | 0 diffs |
| 8 | SV Engine Bypass | -G VarDictJava/testdata/fastas/GRCh37.fa -b ... harness/slices/s1a.bed -U -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (1012 variants) | 0 diffs |
| 9 | N-Base Depth Counting | -G VarDictJava/testdata/fastas/GRCh37.fa -b ... harness/slices/s1a.bed -K -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (1047 variants) | 0 diffs |
| 10 | Read Deduplication (-t) |
-G GRCh37.fa -b ... harness/slices/tiny.bed -t -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (4 variants) | 0 diffs |
| 11 | 3'-Indel Shift (-3) |
-G GRCh37.fa -b ... harness/slices/tiny.bed -3 -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (3 variants) | 0 diffs |
| 12 | Output MAPQ Filter (-O) |
-G GRCh37.fa -b ... harness/slices/tiny.bed -O 55 -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (4 variants) | 0 diffs |
| 13 | Region Extension (-x) |
-G GRCh37.fa -b ... harness/slices/tiny.bed -x 50 -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (6 variants) | 0 diffs |
| 14 | Segment Columns (-s -e) |
-G GRCh37.fa -b ... -s 10 -e 11 -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (4 variants) | 0 diffs |
| 15 | Min Match Length (-M) |
-G GRCh37.fa -b ... harness/slices/tiny.bed -M 50 -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (4 variants) | 0 diffs |
| 16 | Del/Dup Handling (--deldupvar) |
-G GRCh37.fa -b ... harness/slices/tiny.bed --deldupvar -c 1 -S 2 -E 3 -g 4 |
VCFv4.2 | MATCH (4 variants) | 0 diffs |
| 17 | Default Printer (--DP ERR) |
-G GRCh37.fa -b ... -R 20:20178900-20179200 --DP ERR --emit-intermediate |
TSV Table (stderr) | MATCH (4 variants) | 0 diffs |
9. Core Algorithmic Patterns & Mechanics¶
9.1 Tile-and-Halo Bounded Memory Traversal¶
VarDictJava holds entire regional chromosome structures in JVM heap collections. On deep WGS mega-regions or whole chromosomes, this causes JVM heap growth exceeding 32 GB, triggering garbage collection thrashing and Out-Of-Memory errors (issues #197, #384).
VarDictRust decomposes regions into bounded tiles with halo intervals using RAII streaming (crates/vardictrust-core/src/regions.rs:98-140 and crates/vardictrust-core/src/lib.rs:248-255):
Region: [ ==================================================================== ]
Tiles: [ Tile k ][ Tile k+1 ][ Tile k+2 ] ...
Halos: <--[ Tile k ]-->
<--[ Tile k+1 ]-->
- Nominal Tile Size \(T\): Defaults to \(T = 100,000\) bp (or \(T = 50,000\) bp in benchmark scaling configurations).
- Halo Margin \(H\): Set to \(H = 500\) bp (or \(H = 2,000\) bp in wide-read long-insert regimes).
For tile index \(k \ge 0\):
Mathematical Predicates for Boundary Variant Assignment vs Halo Dedup¶
Candidate variants starting at 1-based coordinate \(\text{pos}\) are recorded into VariationData if and only if they satisfy:
-
SNV / MNV (
parse.rs:654): $\(\text{Predicate}\_{\text{SNV}}(\text{pos}) = (\text{start}\_k \le \text{pos} \le \text{end}\_k) \;\land\; (\text{allele} \notin \{'N', 'n'\})\)$ -
Deletion (
parse.rs:1260): $\(\text{Predicate}\_{\text{DEL}}(\text{pos}) = (\text{start}\_k \le \text{pos} \le \text{end}\_k)\)$ -
Insertion (
parse.rs:1433): $\(\text{Predicate}\_{\text{INS}}(\text{pos}) = (\text{start}\_k \le (\text{pos} - 1) \le \text{end}\_k) \;\land\; (\text{seq} \text{ contains no } 'N'/'n')\)$ -
Structural Variant Breakpoints (
parse.rs:1651, 1707): $\(\text{Predicate}\_{\text{SV-clip}}(\text{pos}) = (\text{start}\_k \le \text{pos} \le \text{end}\_k)\)$
Boundary Guarantee: Because \([\text{start}\_k, \text{end}\_k]\) form a strictly disjoint partition of \([R\_{\text{start}}, R\_{\text{end}}]\), no variant start coordinate can satisfy the predicate in more than one tile. An InDel starting in Tile \(k\) and extending across the boundary into the halo of Tile \(k+1\) is emitted exclusively by Tile \(k\).
9.2 CIGAR Modification, Soft-Clip Realignment & Long InDel Rescue¶
Standard BAM aligners (e.g. BWA-MEM) soft-clip read ends when an insertion or deletion exceeds 20–30 bp, causing traditional pileup engines to miss large structural variants. VarDict implements active read-level CIGAR modification and local realignment:
- Soft-Clip Clustering (
realign.rs): Reads with 3′ or 5′ soft-clipped tails \(\ge 10\) bp are clustered by clipping breakpoint. - Anchor Matching & Extension: The soft-clipped sequence is searched against the reference genome within a local search window (controlled by
-I 50and-X 2). - CIGAR Rewrite (
cigar/modify.rs): If a high-affinity alignment is found, the CIGAR string is rewritten (e.g. converting70M30Sinto70M30Ior70M25D5M), rescuing the variant into the candidate pileup.
9.3 Paired Somatic Subtraction & Classification¶
In SomaticMode (crates/vardictrust-core/src/postprocess/somatic.rs), candidate variants from tumor and normal BAMs are combined and classified according to the SomaticPostProcessModule.determinateType decision tree:
StrongSomatic: High-confidence somatic mutation. $\(\left(\text{AF}\_{\text{normal}} < \text{lofreq} \; (0.05) \;\lor\; \text{Cov}\_{\text{normal}} \le 1\right) \;\land\; \text{SSF} \le 0.05 \;\land\; \text{VD}\_{\text{tumor}} \ge \text{min-reads} \; (2)\)$LikelySomatic: Moderate evidence somatic mutation; normal AF exceedslofreqbut tumor AF is substantially higher.StrongLOH: Strong Loss of Heterozygosity. Heterozygous in normal (\(\text{AF} \approx 0.50\)), but shifts to homozygous in tumor (\(\text{AF} \to 1.0\) or \(\text{AF} \to 0.0\)).LikelyLOH: Moderate evidence for loss of heterozygosity.Germline: Constitutional variant present in both tumor and normal. $\(\text{AF}\_{\text{normal}} > 1.0 - \text{lofreq} \;\lor\; \text{SSF} > 0.05\)$SampleSpecific: Variant present in normal but absent in tumor.
9.4 Amplicon Primer Trimming & Bidirectional Bias (AMPBIAS)¶
In AmpliconMode (-a 10:0.95), target intervals are supplied as an 8-column BED containing both the full amplicon boundary (start..end) and the primer-trimmed insert boundary (thickStart..thickEnd).
AMPBIAS Mathematical Formula¶
In var2vcf_valid.pl:185 and crates/vardictrust-core/src/output/vcf.rs:472-476:
GDAMP(Good Amplicons): Number of covering amplicons where the variant passesis_good_var(...). Decremented if the variant overlaps a primer boundary.TLAMP(Total Candidate Amplicons): \(\text{GDAMP} + \text{bad-count}\), wherebad-countis the count of amplicons covering the insert region where the variant failed criteria.NCAMP(No-Coverage Amplicons): Amplicons covering this locus whose depth \(t\) satisfies \(t < \frac{\text{maxcov}}{50.0}\) (\(< 2\%\) of peak depth).AMPFLAG(Conflicting Variants): True if two different amplicons covering the locus report conflicting good variants.
Read Filtering Algorithm (-a distance:fraction)¶
In crates/vardictrust-core/src/cigar/parse.rs:2915-2963, a read is dropped if its alignment coordinates \([segstart, segend]\) relative to the amplicon \([regstart, regend]\) satisfy:
10. Coordinate Contracts & Mathematical Formulations¶
10.1 BAM 0-Based Half-Open (Pos0) vs VCF 1-Based Inclusive (Pos1)¶
To prevent off-by-one errors, VarDictRust enforces coordinate separation via strong Rust newtypes:
- Pos0: 0-based half-open position \([\text{start}\_0, \text{end}\_0)\).
- Pos1: 1-based inclusive position \([\text{start}\_1, \text{end}\_1]\).
- Conversion: pos0.to_one_based() = Pos1(pos0.0 + 1) and pos1.to_zero_based() = Pos0(pos1.0.saturating_sub(1)).
When querying noodles BAM indices with start: Pos0 and end: Pos0:
Because 0-based half-open end equals 1-based inclusive end, bam::build_noodles_region(chr, start.0 + 1, end.0) constructs a noodles::core::Region directly from validated 1-based Position bounds without "{}:{}-{}" string reparsing (preserving colon-bearing GRCh38 HLA-* contig names).
10.2 BED Indexing Contracts (-z Flag)¶
| Parameter Mode | BED Type | Input Columns | Internal Coordinate Adjustment |
|---|---|---|---|
Default (-z 0) |
0-based half-open | chrom, start, end |
Internal start incremented: start_adj = start + 1 |
1-based (-z 1) |
1-based inclusive | chrom, start, end |
Kept verbatim: start_adj = start |
10.3 Fisher's Exact Test (fishers_exact, uniroot solver, banker's rounding)¶
Contingency tables evaluate strand bias (\(2 \times 2\) table of forward/reverse reads for reference and variant alleles):
Under the hypergeometric distribution with fixed row and column sums (\(m = a + b\), \(n = c + d\), \(k = a + c\)):
10.4 Default Filtering Thresholds Table¶
All VCF-stage post-filter cutoffs below (plus --pass-only, --paired-strict, --no-end, --no-pstd-filter, --min-splitreads, and --vcf-all-alleles / --all-alleles across all 18/18 consolidated var2vcf_*.pl flags) can be overridden independently of pileup engine thresholds via --vcf-af, --vcf-min-depth, --vcf-min-vd, --vcf-qmean, --vcf-mapq, --vcf-pmean, --vcf-sn, --vcf-max-nm, --vcf-gt-freq, --vcf-msi, --vcf-cluster-dist, and --vcf-pval (see docs/migration.md).
| Flag | Parameter Name | Default | Evaluation Context & Module | Exact Mathematical Predicate |
|---|---|---|---|---|
-f (--vcf-af) |
freq |
0.01 (1%) |
variations/mod.rsoutput/vcf.rs |
Engine (is_good_var): Fail if \(\text{AF} < 0.01\)VCF Filter ( f0.01): Filter if \(\text{AF} < 0.01\) (0.02 when bare -f 0 in single-sample; 0.0 when --vcf-af 0) |
-r (--vcf-min-vd) |
min_reads |
2 (single)3 (paired VCF) |
variations/mod.rsoutput/vcf.rs |
Engine: Fail if \(hicnt < 2\) VCF Filter ( v2 / v3): Filter if \(hicnt < \text{min-vd} \;\land\; (hicnt \cdot hiaf < 0.5)\) |
-q (--vcf-qmean) |
base_qual |
22.5 |
variations/mod.rsoutput/vcf.rs |
Engine: Fail if \(qmean < 22.5\) VCF Filter ( q22.5): Filter if \(qmean < 22.5\) |
-Q (--vcf-mapq) |
map_qual |
None (BAM)10 / 0 (VCF) |
bam.rsoutput/vcf.rs |
BAM Reader: Drop read if \(\text{MAPQ} < \text{map-qual}\) (when set) VCF Filter ( Q10 single / Q0 paired): Filter if \(mqmean < \text{vcf-mapq} \;\land\; \text{AF} < 0.8\) |
-P (--vcf-pmean) |
read_pos |
5.0 (Eng)8.0 (VCF) |
variations/mod.rsoutput/vcf.rs |
Engine: Fail if \(pmean < 5.0\) VCF Filter ( p8): Filter if \(pmean < 8.0\) |
-m (--vcf-max-nm) |
max_mismatches |
8 (Eng)5.25 (VCF) |
cigar/parse.rsoutput/vcf.rs |
BAM Parse: Drop read if \(\text{NM} - (I + D) > 8\) VCF Filter ( NM5.25): Filter if \(nm > 5.25\) |
-V |
lofreq |
0.05 (5%) |
postprocess/somatic.rs |
Germline: Standard \(\text{AF} > 1.0 - 0.05 \implies \text{Germline}\) Somatic: Normal \(\text{AF} < 0.05 \lor \text{Cov} \le 1 \implies \text{StrongSomatic}\) |
-F |
flag_filter |
0x504 (1284) |
bam.rscigar/parse.rs |
BAM Parse: Drop read if \((\text{FLAG} \ \& \ \text{0x504}) \neq 0\) (0x4 unmapped, 0x100 secondary, 0x400 duplicate, 0x800 supplementary) |
-L |
sv_min_len |
1000 bp |
tovars.rspostprocess/somatic.rs |
\(\text{Length}_{\text{INS}} > 1000 \implies \text{Format as } \text{\<INS\>}\) \(\text{Length}_{\text{DEL}} \ge 1000 \implies \text{Format as } \text{\<DEL\>}\) |
-w |
sv_read_len |
300 bp |
cigar/parse.rs |
Discordant SV candidate insert size cutoff: |
-W |
sv_flanking |
100 bp |
cigar/parse.rs |
\(\lvert\text{TLEN}\rvert > w + (A \cdot W)\) |
-A |
sv_min_af |
4 |
cigar/parse.rs |
\(= 300 + (4 \cdot 100) = 700\text{ bp}\) |
-B |
min_reads_bias |
2 |
variations/util.rs |
Strand Bias Test: If total variant reads \(\le 12\), biased if \(fwd \cdot rev == 0\). If \(>12\), PASS if \(fwd \ge 2 \;\land\; rev \ge 2 \;\land\; \min(\frac{fwd}{tot}, \frac{rev}{tot}) \ge 0.05\) |
-o (--vcf-sn) |
qratio |
1.5 |
variations/mod.rsoutput/vcf.rs |
Engine: Fail if \(hq\_lq\_ratio < 1.5\) VCF Filter ( SN1.5): Filter if \(\frac{hicnt}{locnt + 0.5} < 1.5\) |
-O |
out_mapq |
0 |
variations/mod.rs |
Engine: Fail if \(mqmean < 0.0\) when \(\text{AF} \le 0.30\) |
11. Preserved Upstream Filter Gates¶
A comprehensive audit of the upstream Perl postprocessing script (var2vcf_valid.pl) reveals two legacy filter conditions that are mathematically unreachable under valid genomic inputs:
The Cluster0bp Filter Gate¶
In upstream var2vcf_valid.pl line 147:
Mathematical Derivation: Let \(x\_i = (c\_i, p\_i)\) denote the 1-based start coordinate of the \(i\)-th variant emitted by VarDict. In valid NGS calling workflows, variants are coordinate-sorted:
Here, \(start = p\_i\) and \(pvs = p\_{i-1}\). Therefore:
The condition \(start - pvs < 0\) is strictly unsatisfiable on sorted data.
Why Preserved in VarDictRust:
The Cluster0bp filter description is defined in the standard VCF header emitted by VarDictJava:
--compat=vardictjava mode (whereas opt-in --compat=off additionally stamps ##VarDictRustCompat=off in the VCF header).
The Q0 Filter Gate¶
In upstream var2vcf_valid.pl line 155:
Mathematical Derivation:
By default, var2vcf_valid.pl initializes $MQMEAN = 0. If a user does not pass -Q <mean>, the filter check executes:
However, mapping quality scores in SAM/BAM format are unsigned 8-bit integers (\(0 \le \text{MAPQ} \le 255\)). Thus, \(mapq < 0\) is mathematically impossible. Furthermore, when \(mapq < 10.0\) and -Q is default, upstream Perl emits Q0 instead of Q10 because of an upstream variable assignment quirk.
Why Preserved in VarDictRust:
VarDictRust faithfully emulates this exact upstream filter token mapping, ensuring that if a downstream pipeline checks for FILTER == "Q0", VarDictRust emits the identical token without breaking parity.
12. Empirical Performance & Memory Scaling¶
All benchmarks were recorded on an isolated GCP n2-standard-32 host (Intel Xeon @ 2.80 GHz, Linux x86_64, 8 worker threads, local NVMe RAID-0) following the standardized benchmarking protocol in benchmarks/README.md and certified against perf-budget.json. The Whole Chromosome 1 Scale row below reports the current 3-run median certified scale.json evidence:
| Workload / Benchmark | Threads | VarDictJava Wall Time | vardictcpp Wall Time¹ | VarDictRust Wall Time | Speedup (vs Java) | VarDictJava Peak RSS | vardictcpp Peak RSS¹ | VarDictRust Peak RSS | Memory Scaling (vs Java) | Evidence Artifact | vardictcpp vs Java Parity¹ |
|---|---|---|---|---|---|---|---|---|---|---|---|
Targeted Amplicon (amplicon-tier2) |
-a -nosv -th 8 |
0:02.05 |
0:03.75 |
0:00.04 |
51.2× faster | 118.9 MiB |
88.9 MiB |
11.6 MiB |
10.3× less | amplicon-tier2.json |
SKIP (CPP-3) |
GIAB HG002 (hg002-tier2, 500 regions) |
-th 8 |
1:31.72 |
0:18.87 |
0:09.69 |
9.5× faster | 4.02 GiB |
853.1 MiB |
196.1 MiB |
21.0× less | hg002-tier2.json |
MISMATCH (CPP-9) · CPP-1 |
SEQC2 HCC1395 /BL (seqc2-exome-tier2) |
-th 4² |
51:10.05 |
7:11.99 |
3:18.35 |
15.5× faster | 3.70 GiB |
2.15 GiB |
438.1 MiB |
8.6× less | seqc2-exome-tier2.json |
MISMATCH (CPP-9) |
GIAB HG008 T/N (hg008-tier2) |
-th 4² |
1:19.70 |
0:21.96 |
0:12.86 |
6.2× faster | 3.34 GiB |
303.6 MiB |
181.0 MiB |
18.9× less | hg008-tier2.json |
MISMATCH (CPP-9) |
GIAB HG008 CRAM Twin (hg008-cram-twin) |
-th 4² |
0:11.60 (Rust BAM) |
— | 0:27.33 (Rust CRAM) |
2.36× CRAM/BAM | 190.7 MiB (BAM) |
— | 1.05 GiB (CRAM) |
Bounded 512 MiB cache |
hg008-cram-twin.json |
MATCH (18,426 Rust; 18,425 Cpp CRAM==BAM) |
| Whole Chromosome 1 Scale (249 Mbp) | 1 → 8 threads |
4:21.06 (1 core Rust) |
3:02.80 (BED -th 8) |
1:25.94 (8 cores) |
3.04× parallel | OOM (> 31 GiB at -th 8) |
24.34 GiB (-R) |
1.39 GiB (1.10 GiB at 10 Mbp) |
1.27× flat RSS scaling | scale.json |
CPP-5 (24.34 GiB unchunked) |
¹ Cpp runs beside each arm above under the same pins (-th 8, LC_ALL=C /usr/bin/time -v, taskset-recorded). --chunk deliberately unpinned on BED comparators (cpp default rewrites the Seg column). Per-cell cpp wall/RSS above are transcribed from the linked evidence extra (cpp_wall_s, cpp_maxrss_kb). Full ratios live in evidence.
² hg008/seqc2-exome at -th 4: Java -th 8 is OOM-killed on 31G hosts (bisected 1✓/4✓/8✗); exact cmds in evidence.
12.1 Memory Scaling: Why VarDictRust Scales to WGS¶
VarDictJava holds entire regional chromosome structures in JVM heap collections, leading to JVM heap exhaustion and Out-Of-Memory errors on deep WGS (issues #197, #384):
1. Region-Coupled Worker Heap Lifetime (SimpleMode.java:54-90): VarDictJava dispatches one VardictWorker per BED line (Region) and buffers all output in an in-memory ByteArrayOutputStream until that entire BED interval completes. When a BED file contains multi-megabase or whole-chromosome intervals, each active worker holds the entire interval's heap state simultaneously across all worker threads; only when the caller pre-splits the BED into short intervals does the JVM release per-region maps between intervals.
2. Boxed Reference & K-mer Seed Tables (ReferenceResource.java:107-125): For every base \(i \in [0, L)\) in a BED interval of length \(L\), VarDictJava inserts a boxed (Integer, Character) pair into HashMap<Integer, Character> referenceSequences (\(\approx 72\text{ B/bp}\)) and allocates two String k-mer seed substrings (SEED_1 = 17 bp, SEED_2 = 12 bp) into Map<String, List<Integer>> ref.seed (\(\approx 150\text{–}220\text{ B/bp}\)).
3. Per-Position Pileup Maps (InitialData.java:14-27): Five HashMap<Integer, ...> maps (nonInsertionVariants, insertionVariants, refCoverage, softClips5End, softClips3End) remain live across the entire BED interval (\(\approx 200\text{–}300\text{ B/bp}\) at \(50\times\) depth, totaling \(\approx 450\text{–}600\text{ B/bp}\) of live JVM heap per active interval).
By contrast, VarDictRust subdivides multi-megabase intervals (\(> 1\text{ Mbp}\), DEFAULT_UNTILED_SPAN_MAX = 1_000_000) into bounded \(100\text{ kbp}\) tiles (DEFAULT_TILE_SIZE = 100_000) with \(500\text{ bp}\) halo intervals (halo = 500) while executing intervals \(\le 1\text{ Mbp}\) as single untiled windows (crates/vardictrust-core/src/lib.rs:51-75), backed by flat &[u8] reference byte slices (\(1\text{ B/bp}\)), lazy OnceCell SeedMap indexing (reference.rs:116-242), bounded SplitVarDeduper (200 kbp cross-tile .var boundary retention window) and SpillableVcfAccumulator (8 MiB disk-backed whole-stream VCF spill bound), and immediate RAII drop after each tile. As demonstrated in scale.json:
- Slicing 10 Mbp of chromosome 1 uses 1.10 GiB (1,155,908 KB) peak RSS.
- Slicing all 249 Mbp of human chromosome 1 uses 1.39 GiB (1,462,384 KB) peak RSS.
- The memory scaling ratio across a 25-fold increase in genomic span is only \(1.27\times\) (1.265\times), proving bounded \(O(1)\) memory consumption regardless of whether input intervals are un-chunked chromosomes or pre-tiled BED windows.
13. Unified Audit Trail & Evidence Manifest¶
Every claim in this omnibus report is backed by a permanent, machine-readable evidence artifact in benchmarks/evidence/, cataloged in the Benchmark Specification & Ledger. All artifacts are cryptographically bound to their verified release engine fingerprints:
| Evidence File | Release Fingerprint | SHA-256 Checksum | Validation Role & Scope |
|---|---|---|---|
amplicon-tier2.json |
729cf0f46bd30c4b |
1109ab657ccd2156d5cf677fd1cf5e9a53d8d4aad7952039b18c4d2c85e80c01 |
Pillar 5: Targeted amplicon panel dual-engine differential parity (0 diffs). |
extended-coverage-tier2.json |
729cf0f46bd30c4b |
f66e52f9e491c551d9d522324f967b295be7624cee293c4a97802b4921dad57d |
Pillar 8: 17 extended operational modalities (RNA -i, SVs, all supported flags; 0 diffs). |
hg002-tier2.json |
729cf0f46bd30c4b |
fb37c70d72cfe84ffbb29bdb155081871d840f7f3f3a1ad7e4c0f4eb19da7f56 |
Pillar 1: GIAB HG002 20 Mbp WGS dual-engine differential parity (0 diffs). |
hg002-truth.json |
729cf0f46bd30c4b |
8028050575fb4a562d6b03bc1b2486d378db0de9c22408f21705e61624f6e79c |
Pillar 1: NIST v4.2.1 truth concordance (Rust vs Java EQUAL, \(F_1 = 0.9699\)). |
hg005-truth.json |
729cf0f46bd30c4b |
a18f4b7c7829341d24147b428369d8cae9be93fc7f3ea93c397cba6b938a8588 |
Pillar 9: NIST v4.2.1 HG005 truth concordance (Rust vs Java EQUAL, \(F_1 = 0.9667\)). |
hg008-cram-twin.json |
729cf0f46bd30c4b |
2ab326bf62ad3b0330f6317ca960918967e0f1b7e6d4ca3845d6e6e514eb0cd7 |
Pillar 4: CRAM twin decode byte parity against BAM reference. |
hg008-tier2.json |
729cf0f46bd30c4b |
3ff37be82bc7c89bf175918fba9dc82b3b2c3963318a17f22c00fc3042864465 |
Pillar 4: GIAB HG008 somatic PDAC dual-engine differential parity (0 diffs). |
hg008-truth.json |
729cf0f46bd30c4b |
2654ef192924a13599c1ca71defd01b468ab53d1e000642dace945909fb8d94b |
Pillar 4: NIST Draft v0.3 somatic truth concordance (Rust vs Java EQUAL). |
multimodal-slices-tier2.json |
729cf0f46bd30c4b |
ca469e18ebfaf283ec405ab7cf5fc2b77bc4bc57a130501c7ed0dedd899738e1 |
Pillar 9: 18 multi-slice multi-cohort evaluations across 9 chrs (0 diffs). |
musl-ci.json |
729cf0f46bd30c4b |
813611846cfbd26c448da54ab6e7fc8c94869edea756d7700eb21ca722e7287c |
Fully static x86_64-unknown-linux-musl target compilation and binary certification. |
na24385-b37-truth.json |
729cf0f46bd30c4b |
e1b36eaf2b720725287593965bbdf742dad55d7084a788037e2d256432ea4794 |
Pillar 9: NIST v4.2.1 NA24385 b37 truth concordance (Rust vs Java EQUAL, \(F_1 = 1.0\)). |
perf-budget.json |
729cf0f46bd30c4b |
5a3e54fc364800a9cb3ca0546a3fb821a1e9ce5d1720a88500d4b8522e12334b |
5-target performance budget verification (amplicon, HG002, SEQC2, HG008, HG008 CRAM twin). |
scale.json |
729cf0f46bd30c4b |
4925d1caeb83f35f934fe37779719b680c308afd3c5c1fa397f92bf7250fc41c |
Pillar 7: Chromosome 1 (249 Mbp) bounded memory scaling & parallel speedup. |
seqc2-exome-tier2.json |
729cf0f46bd30c4b |
3c2db4b96f170a2b514891f77db369c554305085f66f2561afa4c915f9a7cde4 |
Pillar 2: SEQC2 somatic whole exome dual-engine differential parity (0 diffs). |
seqc2-slices-tier2.json |
729cf0f46bd30c4b |
021c6ff5ac4f5dcd1e47b46263bd5658315b60c769b46d45e92f2e7539b71564 |
Pillar 3: SEQC2 somatic multi-chromosome slices dual-engine differential parity (0 diffs). |
seqc2-truth.json |
729cf0f46bd30c4b |
f8cadba47b56db1ae1ded0324689dbd7d4eeecdd7d8997128a97c645ade8ad47 |
Pillar 2: SEQC2 v1.2.1 somatic truth concordance (Rust vs Java EQUAL). |
14. GCP 60-Cell Multi-Stage Cloud Benchmark & Cross-Platform/Truth-Set Expansion (v1.0.6, n2-standard-32 / c3d-standard-32)¶
In addition to the 16 repository-tracked acceptance artifacts in §13, VarDictRust v1.0.6 (2a8e9a3, engine fingerprint 5865a2a0b24a8c17, --perf fingerprint c490c36317b8f25b) was evaluated across a 6-stage, 60-directory Google Cloud Platform (GCP) study (gs://vardict-paper-trial-results/cells-v106/) orchestrated by harness/gcp_paper_runner.sh and harness/run_stage_6.sh, governed by benchmarks/gcp-prereg.md and docs/validation/gcp-study-protocol.md, and synthesized in benchmarks/gcp-study-v106/master_gcp_metrics.json (docs/validation/provenance/task-5b-to-6-report.md).
14.1 Six-Stage 60-Directory Architecture, Hardware & Cloud Ledger¶
All 59 compute cells and 1 evidence_certified bundle executed on dedicated GCP n2-standard-32 (32 vCPUs, 128 GiB RAM, 100 GB pd-ssd boot + 4×375 GB [1.5 TB] NVMe Local SSD RAID0) and n2-highmem-32 (32 vCPUs, 256 GB RAM, 250 GB pd-ssd boot + 8×375 GB [3.0 TB] NVMe Local SSD RAID0) instances locked to identical Intel Xeon Platinum 8373C (--min-cpu-platform="Intel Ice Lake", 2.60 GHz base / 3.50 GHz all-core turbo) silicon (with local development/smoke validation on c3d-standard-32 / Linux x86_64) under systemd-run --scope -p AllowedCPUs=0-$((P-1)) -p MemoryMax=<CAP>:
| Stage | Scope & Benchmark Cohort | Directories in cells-v106/ |
Primary Gate / Outcome |
|---|---|---|---|
| Stage 1 | Pre-flight memory ceiling (amplicon, HG008), multi-region reference (Gate 7), & H1a tile-size invariance (0.5..10 Mbp) |
4 |
4/4 PASS (100% MATCH; ceiling RSS 11.5 MB / 502.8 MB \(\ll 8\text{ GB}\)) |
| Stage 2 | Tier P Wolff (2026) AML panel replication (5 samples + somatic pair at 1c/8c, n=3), Table 3 -R chr1 (249 Mbp), Fig 1–3 field callers, & 13-mode parity sweep |
17 |
17/17 PASS (100% .var/.vcf MATCH; -R chr1 0.31 GiB Rust vs 10.58 GiB C++ vs 106.47 GiB Java -Xmx200g) |
| Stage 3 | Full-transcriptome HG002 GM24385 mRNA (51.8 GiB STAR 2-pass BAM, -i splice mode, n=3) |
1 |
1/1 PASS (12,668 splice rows 100% sorted-set MATCH; 4.94s / 359.9 MB Rust vs 23.31s / 4.79 GiB Java) |
| Stage 4 | Tier E/G 1..32c scaling (SEQC2 exome), chr1 1..249 Mbp span curve (8/16/32c), 2×4c node packing, QUAL ROC sweep (0..200), CRAM twin, + evidence_certified |
15 (14 + 1) |
15/15 PASS (11.98× 32c exome speedup; 1.18× chr1 RSS ratio at -th 8) |
| Option C Sweep | Full-core (-th 32) intermediate .var & .vcf parity sweep across 87 sub-arms (Tier P/E/G, RNA 51.8 GiB, ultra-deep MRD -f 0.0005 / -f 0 up to 45,000×) |
12 |
12/12 PASS (87/87 [100%] sub-arms MATCH, with standard <=1 Mbp BED intervals running untiled by default and the two >1 Mbp single-region runs using --tile-size 10000000 and --tile-size 250000000) |
| Stage 5 | Full-genome chr1..chr22 WGS (HG002 130.8 GB & HG008 329.0 GB 364× Arm A contigs + Arm B ≤50 kbp GIAB BED), 10-platform chr20 panel + 18/18 -f 0 noise floor, GRCh38 field callers, & H4 security matrix |
7 |
7/7 PASS (HG002 Arm B 8,111,171 variants 100% MATCH on callable intervals; 18/18 STRICT_MATCH noise floor) |
| Stage 6 | Literature-gap closure (B9): HG002 GIAB v5.0q (T2T-Q100), CMRG v1.00, Mosaic SNV v1.10; HG008 v0.4 11-caller (27-row) ML/commercial matrix; 20%→1% purity titration; 70-cell GA4GH v3.5 stratification |
4 |
4/4 PASS (84/85 = 98.82% Mosaic SNV recall on Arm A & Arm B; 16.7× SNV \(F_1\) & 25.1× recall advantage at 0.5% VAF; 70/70 GA4GH v3.5 strata 0 diffs) |
| Total | Complete 6-Stage Cloud Study (gs://vardict-paper-trial-results/cells-v106/) |
60 |
$228.90 / $300.00 total spend (0 active VMs/disks; 760.96 GiB cached at ~$3.51/wk) |
14.2 Stages 1–4 & Option C Sweep: Whole-Chromosome -R chr1 Memory Blowup, Transcriptome -i, and 1–32 Core Scaling¶
- Wolff (2026) Table 1–3 & Fig 1–3 Replication (
Stage 2): Across all5single-sample AML MiSeq panels (SRR15006375,SRR15006376,SRR15006386,SRR15006540,SRR8657348773,667intervals) and the somatic pair (SRR15006376|SRR15006386) at-th 1and-th 8(n=3),VarDictRust v1.0.6achieves100%.varand.vcfparity (FP = FN = 0) with2.36×–5.56×speedup and4.3×–26.5×lower peak RSS thanVarDictJava v1.8.3(187.5–493.2 MBvs2.03–7.44 GB). On the Table 3 un-chunked whole-chromosome-R chr1:1-249250621(249.25 Mbp,SRR8657348) stress test (s2_table3_R_chr1_java_200g_n3,s2_table3_R_chr1_rust_and_cpp),VarDictJavaOOM-crashes at-Xmx4g(rc=3) and requires106.47 GiB(111.65 GB) peak RSS (501.83s) at-Xmx200g,vardictcppconsumes10.58 GiB(11.10 GB) peak RSS (105.89s), andVarDictRust v1.0.6finishes in9.75sat0.31 GiB(318.6 MB) peak RSS —51.5×faster and342.2×less RAM thanVarDictJava, and10.9×faster and34.0×less RAM thanvardictcpp. - Full-Transcriptome RNA-seq Splice Calling (
Stage 3,s3_rna_splice_parity_n3): On the51.8 GiBSTAR 2-pass alignedHG002GM24385 mRNA transcriptome BAM (-isplice mode),VarDictRust v1.0.6reproduces all12,668intermediate rows (100%sorted-setMATCH) in4.94sat359.9 MBRSS vsVarDictJava's23.31sat4.79 GiBRSS (4.72×faster,13.6×less RAM;vardictcppSKIPs-i). - Whole-Exome 1–32 Thread Scaling & Span Invariance (
Stage 4): On the fullSEQC2 HCC1395whole exome (120,307target exons,339,698variants,s4_scale_exome_3way_th{1..32}),VarDictRust v1.0.6scales from812.75s(1c) to118.90s(8c) and67.86s(32c,11.98×parallel speedup,747.2 MBpeak RSS) vsVarDictJava's1,991.64s/21.77 GiBRSS at32c(29.3×faster,29.8×less RAM). Acrosschr110 Mbp → 249 Mbp, peak RSS ratio is1.18×at-th 8,1.29×at-th 16, and1.41×at-th 32(all< 1.5×pre-registeredH2bound).
14.3 Stage 5: Full-Genome chr1..chr22 WGS (HG002 & HG008 364×) and 10-Platform Sequencing Chemistry Panel¶
Stage 5 evaluated full-genome chr1..chr22 autosome calling (-th 32) under both Arm A (22 un-chunked whole-chromosome intervals, 2,875,001,522 bp) and Arm B (≤50 kbp pre-tiled GIAB callable intervals):
Full-Genome WGS Cell (-th 32) |
Input BAM Size & Depth | VarDictJava v1.8.3 (-Xmx200g) |
vardictcpp (--chunk 50000) |
VarDictRust v1.0.6 (5865a2a0b24a8c17) |
Parity / Truth Verdict |
|---|---|---|---|---|---|
HG002 Arm A (22 Contigs) (s5_wgs_hg002_full_contigs_3way_th32) |
130.8 GB (~50× 2×250 bp) |
OOM Crash (rc=3) at 213.70 GB RSS |
18m 50.80s · 31.91 GB RSS (9,953,338 vars; +309,569 boundary dupes) |
25m 16.61s · 4.93 GB (4.70 GiB) RSS (9,643,769 vars) |
OOM-vs-completed (6.5× less RAM than C++) |
HG002 Arm B (≤50 kbp GIAB) (s5_wgs_hg002_full_giab_3way_th32) |
130.8 GB (2.51 Gbp, 56,642 intervals) |
3h 08m 15s · 34.14 GB RSS (8,111,171 vars) |
11m 40.98s · 28.35 GB RSS (8,111,565 vars) |
20m 21.21s · 1.43 GB (1.37 GiB) RSS (8,111,171 vars) |
100% MATCH on callable intervals · rtg vcfeval EQUAL (\(F_1 = 0.9651\) best-\(F_1\), \(0.6624\) None) |
HG008 Arm A (22 Contigs) (s5_wgs_hg008_full_contigs_3way_th32) |
329.0 GB (195×/169× = 364× T/N) |
OOM Crash (rc=3) at 214.10 GB RSS |
1h 02m 50s · 91.85 GB RSS (13,182,812 vars) |
2h 49m 52s · 12.14 GB (11.57 GiB) RSS (13,067,287 vars) |
OOM-vs-completed (7.6× less RAM than C++) |
HG008 Arm B (≤50 kbp GIAB) (s5_wgs_hg008_full_giab_3way_th32) |
329.0 GB (2.37 Gbp, 50,554 intervals) |
Timeout (rc=124, >6h) at 62.51 GB RSS |
21m 46s · 21.16 GB RSS (10,287,644 vars) |
1h 45m 55s · 4.88 GB (4.65 GiB) RSS (10,195,118 vars) |
OOM/Timeout-vs-completed · GIAB v0.3 \(F_1 = 0.6547\), v0.4 \(F_1 = 0.6585\) |
In s5_cross_platform_short_read_chr20_panel (benchmarks/gcp-study-v106/stage5/cross_platform_chr20_summary.tsv and cross_platform_f0_noise_floor.tsv), VarDictRust v1.0.6 was evaluated across 10 sequencing platform arms on full chr20 (64.44 Mb) at both -f 0.01 and -f 0 (4 HG002 germline: Illumina NovaSeq 6000, Element AVITI 80×, MGI DNBSEQ 100×, Ultima UG100 40× CRAM+BAM; 6 HG008 somatic: Illumina NovaSeq 195×/169×, Roche Axelios 1 SBX-Duplex 119×/44×, PacBio Onso SBB 136×/48×, Element AVITI 111×/77×, Ultima UG100 Standard 306×/234×, Ultima UG100 ppmSeq 157×/160×), plus an 18-row singleton noise-floor stress panel (cross_platform_f0_noise_floor.tsv: 6 somatic chemistries × 3 threshold regimes f0.01_r2, f0_r2, f0_r1 totaling 18,407 candidates and 2,865 PASS somatic calls). VarDictRust v1.0.6 achieved 18/18 STRICT_MATCH (0 textual differences within \(\varepsilon = 10^{-6}\)) across all 18 noise-floor rows. On chr20, VarDictRust v1.0.6 completed all 20/20 runs (10 platforms × -f 0.01 & -f 0), whereas VarDictJava v1.8.3 timed out (rc=124) on 3 of the 10 platforms at both -f 0.01 and -f 0 (hg008_roche_sbx, hg008_ultima_ug100, hg008_ultima_ppmseq; plus hg008_{illumina,element_aviti,pacbio_onso} at -f 0), so VarDictRust == VarDictJava STRICT_MATCH and identical rtg vcfeval \(F_1\) hold across the 7/7 completing platforms (14/14 runs at -f 0.01 & -f 0 across those 7 platforms / 11/11 rc=0 VarDictJava runs), with SNV \(F_1 = 0.6622\text{–}0.9598\) (Std GIAB BED) / \(0.6622\text{–}0.9618\) (UG-HCR v2.1) on HG002 and SNV \(F_1 = 0.6870\text{–}0.8804\) (Std GIAB BED, -f 0.01) / \(0.7532\text{–}0.9048\) (UG-HCR v2.1, -f 0.01) on HG008 (0.6498–0.8804 Std / 0.7505–0.9048 UG-HCR v2.1 across -f 0.01 & -f 0).
14.4 Stage 6: Literature-Gap Closure (GIAB v5.0q T2T-Q100, CMRG v1.00, Mosaic SNV v1.10, 11-Caller HG008 v0.4, Low-VAF Titration & 70-Cell GA4GH v3.5)¶
Stage 6 (harness/run_stage_6.sh, gcp-prereg.md §B9) executed four post-registration exploratory analyses to benchmark VarDictRust v1.0.6 against 2024–2026 community truth standards and modern deep-learning/commercial somatic callers:
- Modern
HG002Truth Benchmarks (s6_hg002_v50q_cmrg_mosaic_eval,stage6/hg002_v50q_cmrg_mosaic_summary.tsv): - NIST GIAB
v5.0q(T2T-HG002-Q100,chr1..chr22,2.74 Gbp):VarDictRust v1.0.6(Arm AVarDictRust_FullContigs) achievesSNV\(P = 0.5155, R = 0.9367, F_1 = 0.6650\) andInDel\(P = 0.6151, R = 0.7007, F_1 = 0.6551\); onArm B(VarDictRust_GIAB50kb/VarDictJava_GIAB50kb≤50 kbpGIAB BED),VarDictRustandVarDictJavaachieve identical precision, recall, and \(F_1\) (SNV\(P = 0.5083, R = 0.8866, F_1 = 0.6461\);InDel\(P = 0.5708, R = 0.5281, F_1 = 0.5487\)). - NIST
CMRG v1.00(273Challenging Medically Relevant Genes):VarDictRust v1.0.6(Arm AVarDictRust_FullContigs) achievesSNV\(P = 0.5482, R = 0.8920, F_1 = 0.6791\) andInDel\(P = 0.6310, R = 0.7702, F_1 = 0.6937\), while onArm B(VarDictRust_GIAB50kb == VarDictJava_GIAB50kb) both engines achieve identical accuracy (SNV\(P = 0.5355, R = 0.7173, F_1 = 0.6132\);InDel\(P = 0.5803, R = 0.4904, F_1 = 0.5316\)). - NIST GIAB
Mosaic SNV v1.10(85Somatic Mosaic SNVs inHG002): BothVarDictRust_FullContigs(Arm A) andVarDictRust_GIAB50kb == VarDictJava_GIAB50kb(Arm B) recover84 / 85(98.82%sensitivity /0.9882). HG008 v0.411-Caller Modern ML & Commercial Landscape (s6_hg008_modern_ml_and_commercial_callers,stage6/hg008_modern_ml_commercial_callers_v04.tsv): Evaluated across11callers (27rows acrossHG008_FullWGS_v0.4_All,HG008_FullWGS_v0.4_NoGI, andHG008_Slice_v0.4_All), comparingVarDictRust_v1.0.6against7NIST GIABLiss_labfull-WGS callsets (DRAGEN_v4.2.4_Linear,DRAGEN_v4.2.4_Graph,Lancet2_NYGC,Hartwig_SAGE_2026,DeepSomatic_v1.6.0,ClairS_v0.4.1,Ultima_DeepVariant_Somatic) and3slice callers (Mutect2,Strelka2,LoFreq).VarDictRust_v1.0.6achievesSNV\(P = 0.8262, R = 0.7542, F_1 = 0.7886\) andInDel\(P = 0.6288, R = 0.4011, F_1 = 0.4898\) onHG008_FullWGS_v0.4_All(SNV\(P = 0.8258, R = 0.7810, F_1 = 0.8028\) andInDel\(P = 0.6703, R = 0.4832, F_1 = 0.5616\) onHG008_FullWGS_v0.4_NoGI;SNV\(P = 0.9916, R = 0.6048, F_1 = 0.7513\) andInDel\(P = 0.9479, R = 0.3095, F_1 = 0.4667\) onHG008_Slice_v0.4_All), surpassingLancet2_NYGC(21.79%, \(F_1 = 0.3568\)),DeepSomatic_v1.6.0(18.45%, \(F_1 = 0.3072\)),ClairS_v0.4.1(13.02%, \(F_1 = 0.2298\)), andUltima_DeepVariant_Somatic(24.59%, \(F_1 = 0.3900\)) inHG008_FullWGS_v0.4_AllInDel recall and \(F_1\) (whereasDRAGEN_v4.2.4_Linear/GraphInDel recall is43.20%/43.23%onAlland70.67%onNoGI, andHartwig_SAGE_2026InDel recall is63.09%onAlland78.83%onNoGI).- Low-VAF Somatic Tumor-Purity Titration Curve (
s6_low_vaf_titration_truth_curve,stage6/low_vaf_titration_curve.tsv): Across5syntheticHG008tumor-normal admixtures (20%,10%,5%,2%,1%tumor purity \(\leftrightarrow\)10.0%,5.0%,2.5%,1.0%,0.5%expected clonal VAF) called at-f 0.002 -th 16,VarDictRust v1.0.6matchesVarDictJava v1.8.3at every purity level while running7.5×–7.7×faster (8.53–8.76svs65.16–66.76s) and using15.4×–16.5×less RAM (780,628–859,564 KBvs12,316,396–13,765,960 KB):
| Tumor Purity / Expected Clonal VAF | VarDictRust v1.0.6 (== VarDictJava) SNV \(R\) / \(F_1\) |
VarDictRust v1.0.6 (== VarDictJava) InDel \(R\) / \(F_1\) |
Mutect2 v4.6.2.0 SNV \(R\) / \(F_1\) |
Strelka2 v2.9.10 SNV \(R\) / \(F_1\) |
LoFreq v2.1.5 SNV \(R\) / \(F_1\) |
|---|---|---|---|---|---|
20% Purity (10.0% VAF) |
0.6559 / 0.7512 |
0.2075 / 0.3104 |
0.5826 / 0.7363 |
0.7070 / 0.8283 |
0.4072 / 0.5787 |
10% Purity (5.0% VAF) |
0.5179 / 0.5852 |
0.1361 / 0.2041 |
0.3237 / 0.4891 |
0.4719 / 0.6412 |
0.0716 / 0.1335 |
5% Purity (2.5% VAF) |
0.3680 / 0.4215 |
0.1054 / 0.1422 |
0.0988 / 0.1798 |
0.1891 / 0.3181 |
0.0051 / 0.0102 |
2% Purity (1.0% VAF) |
0.1175 / 0.1584 |
0.0544 / 0.0782 |
0.0119 / 0.0236 |
0.0187 / 0.0368 |
0.0000 / NaN |
1% Purity (0.5% VAF) |
0.0426 / 0.0569 |
0.0238 / 0.0350 |
0.0017 / 0.0034 |
0.0017 / 0.0034 |
0.0000 / NaN |
At 1% purity (0.5% VAF), probabilistic callers (Mutect2, Strelka2, LoFreq) collapse to \(\le 0.17\%\) SNV sensitivity (\(F_1 \le 0.0034\), 0% InDel recall), whereas VarDictRust v1.0.6 (== VarDictJava v1.8.3) retains 4.26% SNV recall (0.0569 \(F_1\), 25.1× higher recall and 16.7× higher \(F_1\) than Mutect2/Strelka2) and 2.38% InDel recall (0.0350 \(F_1\)) (vardictcpp matches VarDictRust/VarDictJava at 10%–1% purity but diverges at 20% purity with MISMATCH, dropping SNV recall from 0.6559 to 0.5707 and InDel recall from 0.2075 to 0.1565).
4. 70-Cell GA4GH v3.5 Cross-Platform Stratification Matrix (s6_ga4gh_v35_stratification_matrix, stage6/ga4gh_v35_cross_platform_stratification.tsv): Evaluates 7 GA4GH v3.5 GRCh38 strata (Homopolymer_4to6bp, Homopolymer_7to11bp, Homopolymer_ge12bp, AllTandemRepeats, SegmentalDuplications, LowMappability, RefSeq_CDS) across all 10 sequencing platforms (70 cells total), confirming 100% VarDictRust == VarDictJava concordance across every stratum and platform.
14.5 Tracked Study Synthesis Artifacts & SHA-256 Ledger (benchmarks/gcp-study-v106/)¶
All synthesized tables and metrics from the 60-cell GCP study are committed in-tree under benchmarks/gcp-study-v106/ (SHA256SUMS.tsv):
| Tracked Study Artifact Path | Size (Bytes) | SHA-256 Digest | Contents & Provenance Scope |
|---|---|---|---|
benchmarks/gcp-study-v106/SHA256SUMS.tsv |
1,116 |
71fed8c08e0d81dab8ae6644e13a58fda3f96a3f8419ee14d3c6a1db1426b4b2 |
Master SHA-256 and byte-size manifest for all 10 tracked synthesis artifacts in benchmarks/gcp-study-v106/. |
benchmarks/gcp-study-v106/cells_60_inventory.tsv |
14,555 |
fdd1518860d5acebc01f3184b23e7b16a7156523bea4c162064c2d2cf85a2266 |
Complete 60-directory inventory (cell_id, stage, tier, exit_code, parity_verdict, paper_targets). |
benchmarks/gcp-study-v106/master_gcp_metrics.json |
551,842 |
ed31c259ba0d3e3c9695503b35becbe55b29d72e26491d81d4f7492a101863f4 |
Unified JSON synthesis of all 60 GCS directories, 16 evidence JSONs, and flat_macros. |
benchmarks/gcp-study-v106/stage5/cross_platform_chr20_summary.tsv |
7,589 |
f410b906dffb10f671979bd6862a6d814e45ccdb5652660577bfd1bd3a6718f6 |
Stage 5 10-platform chr20 3-way timing, RSS, parity, and rtg vcfeval summary at -f 0.01 & -f 0. |
benchmarks/gcp-study-v106/stage5/cross_platform_f0_noise_floor.tsv |
868 |
d68febe93eaff27cda6a8a0da9a558a154cb996a9332a5a4a4934cbc5ac18f1c |
Stage 5 18/18 STRICT_MATCH noise-floor stress test (6 somatic chemistries × 3 regimes f0.01_r2, f0_r2, f0_r1). |
benchmarks/gcp-study-v106/stage5/cross_platform_rtg_eval_both_beds.tsv |
9,299 |
b5803e6fdbcf33b040c15d1c655836533666df056a7336ab73ac2ac74761a0eb |
Stage 5 rtg vcfeval across standard GIAB and Ultima UG-HCR v2.1 beds. |
benchmarks/gcp-study-v106/stage5/grch38_field_caller_accuracy.tsv |
1,685 |
5ca701e62d1670aa164e53bb9f785bd0329b753b1e15d25d649ada15007f6b9a |
Stage 5 native GRCh38 field-caller accuracy (HG002, HG008 v0.3, SEQC2 v1.2.1). |
benchmarks/gcp-study-v106/stage6/ga4gh_v35_cross_platform_stratification.tsv |
6,422 |
e2db677c4dbe4c503f6f93f07077543513dfec2b211ac4a3eb925028c6c18387 |
Stage 6 70-cell GA4GH v3.5 (7 strata × 10 sequencing platforms) stratification matrix. |
benchmarks/gcp-study-v106/stage6/hg002_v50q_cmrg_mosaic_summary.tsv |
1,042 |
193e768124385ee07058acbfd8c8b30ce62a725f8b417db7f9bb0435cbd027d1 |
Stage 6 HG002 GIAB v5.0q (T2T-Q100), CMRG v1.00, and Mosaic SNV v1.10 (84/85) summary. |
benchmarks/gcp-study-v106/stage6/hg008_modern_ml_commercial_callers_v04.tsv |
2,660 |
113729bddb39a975b4c964e918f81a9e5fd1c53e83722a92b52d43ad35d19726 |
Stage 6 HG008 v0.4 11-caller (27-row) benchmark (DRAGEN, DeepSomatic, ClairS, SAGE, Lancet2, Ultima DV, etc.). |
benchmarks/gcp-study-v106/stage6/low_vaf_titration_curve.tsv |
2,428 |
1ec64cd8377f08f8a3356c35e8e3931dd55bfe14ad764956b85fd0008023f088 |
Stage 6 HG008 20%→1% purity (10%→0.5% VAF) titration curve at -f 0.002 across 6 callers. |
14.6 VarDictRust v1.0.7 92-Chromosome Per-Contig Parity Suite (docs/validation/chr-parity-v107.md)¶
In addition to the whole-cohort acceptance artifacts in §13, VarDictRust v1.0.7 (356eb13ba068790c) was verified chromosome-by-chromosome across 92 chromosome runs spanning 5 cohorts (0 mismatches vs VarDictJava v1.8.3, 0 new Java/C++ oracle runs), archived in docs/validation/chr-parity-v107.md and benchmarks/chr-parity-v107.json:
| Cohort | Mode | Chr Runs | Java Variants | Rust (v1.0.7) Variants |
C++ Variants | Java == Rust Verdict | Rust vs C++ Shared | Only Rust/Java | Only C++ | C++ Exact (1e-6 / 1e-4 END-norm) |
|---|---|---|---|---|---|---|---|---|---|---|
HG008_WGS_Somatic |
Paired Somatic WGS Slice | 21 |
18,426 |
18,426 |
18,425 |
21/21 MATCH |
18,424 |
2 |
1 |
18,374 (50 diffs) / 18,418 (6 diffs) |
SEQC2_Paired_Somatic |
Paired Somatic WES (HCC1395\|HCC1395BL) |
24 |
623,444 |
623,444 |
623,442 |
24/24 MATCH |
623,442 |
2 |
0 |
622,497 (945 diffs) / 623,427 (15 diffs) |
SEQC2_Single_Sample_Scale |
Single-Sample WES (HCC1395) |
24 |
339,698 |
339,698 |
339,697 |
24/24 MATCH |
339,571 |
127 |
126 |
339,216 (355 diffs) / 339,564 (7 diffs) |
HG002_chr20_Full_VCF |
Germline WGS chr20 (HG002) |
1 |
227,562 |
227,562 |
227,560 |
1/1 MATCH |
227,214 |
348 |
346 |
227,074 (140 diffs) / 227,205 (9 diffs) |
HG002_Full_WGS_GIAB_v4.2.1 |
Full 22-Autosome Germline WGS (130.77 GB 2×250bp BAM, 482,436 \(\le 50\text{kbp}\) GIAB intervals) |
22 |
8,111,171 (7,292,435 vcfeval PASS) |
8,111,171 (7,292,435 vcfeval PASS) |
8,111,565 (7,292,806 vcfeval PASS) |
22/22 Gates A–D MATCH |
TP=3,688,055 (of 3,688,079) |
TP+24 |
TP+15 |
5/5 rtg vcfeval files byte-identical to Java (F1=0.6624 None / 0.9651 Optimal) |
15. Exact Reproduction Commands¶
All benchmark suites are 100% reproducible on any POSIX system equipped with samtools, JDK 8+, and the vardict-oracle conda environment (setup via harness/setup_oracle.sh):
15.1 GIAB HG002 Unified First-Class Validation Runner (Tier-2 & Tier-3)¶
15.2 SEQC2 Somatic Whole-Exome Comparison (Tier-2 & Tier-3)¶
# 1. Fetch reference genome and SEQC2 assets (configured via DATA_DIR, default: scratch/g4)
bash harness/fetch_data.sh refs seqc2
# 2. Run SEQC2 Somatic Whole-Exome differential comparison (Tier-2)
bash harness/compare.sh \
scratch/g4/ref/d1vd1/GRCh38.d1.vd1.fa \
"scratch/g4/seqc2/HCC1395.bam|scratch/g4/seqc2/HCC1395BL.bam" \
scratch/g4/seqc2/exome.engine.bed \
"HCC1395|HCC1395BL" -th 8
15.3 Targeted Amplicon Panel Comparison (Tier-2)¶
# 1. Prepare amplicon overlapping panel fixture
bash harness/get_amplicon_fixture.sh
# 2. Run targeted amplicon panel differential comparison (Tier-2)
bash harness/compare.sh \
scratch/g4/amplicon/ref.fa \
scratch/g4/amplicon/amplicon.bam \
scratch/g4/amplicon/correct_8columns_amplicon.bed \
SAMPLE -a 10:0.95 -th 8
15.4 Extended Modality Suite (Pillar 8, Tier-2)¶
15.5 Multi-Slice Multi-Modal Dataset Expansion Suite (Pillar 9, Tier-2)¶
# 1. Ingest and stage multi-modal BAM slices (<3 minutes, <150 MB total disk space)
bash harness/get_multimodal_slices.sh
# 2. Run the 18-slice dual-engine differential parity suite (Tier-2)
bash harness/run_multimodal_slices.sh
# Note: On shared multi-tenant hosts, execution may optionally be wrapped with harness/courtesy.sh:
# EST_MIN=15 bash harness/courtesy.sh bash harness/run_multimodal_slices.sh
15.6 Master Upstream Integration Regression Corpus (Pillar 6, Tier-1)¶
15.7 Master Compound Release Acceptance Gate¶
15.8 Six-Stage 60-Cell GCP Study Runner & Plan Verification¶
# Verify the 6-stage GCP execution plan and invariants without cloud spend
bash harness/gcp_paper_runner.sh --plan-check
# Verify SHA-256 integrity of all tracked v1.0.6 study synthesis artifacts
(cd benchmarks/gcp-study-v106 && sha256sum -c <(awk 'NR>1 {print $1 " " $2}' SHA256SUMS.tsv))
16. References & Benchmark Citations¶
@article{lai2016vardict,
author = {Lai, Zhongwu and Markovets, Alena and Ahdesmaki, Miika and Chapman, Brad and Hofmann, Oliver and McEwen, Robert and Johnson, Justin and Dougherty, Brian and Barrett, J. Carl and Dry, Jonathan R.},
title = {{VarDict: a novel and versatile variant caller for next-generation sequencing in cancer research}},
journal = {Nucleic Acids Research},
volume = {44},
number = {11},
pages = {e108},
year = {2016},
doi = {10.1093/nar/gkw227}
}
@article{seqc2_2021_reference,
author = {Fang, Li Tai and Zhu, Baolin and Zhao, Yongmei and Chen, Wanqiu and Yang, Zhaowei and Xu, Leming and others},
title = {{Establishing community reference samples, data and call sets for cancer genomics}},
journal = {Nature Biotechnology},
volume = {39},
number = {9},
pages = {1151--1160},
year = {2021},
doi = {10.1038/s41587-021-00993-6}
}
@article{giab_2020_benchmark,
author = {Zook, Justin M. and Hansen, Nancy F. and Olson, Nathan D. and Chapman, Lindsay and Mullikin, James C. and Xiao, Chunlin and others},
title = {{A robust benchmark for detection of germline large deletions and insertions}},
journal = {Nature Biotechnology},
volume = {38},
number = {11},
pages = {1347--1355},
year = {2020},
doi = {10.1038/s41587-020-0538-8}
}
@misc{rewrites_bio_2026,
author = {{Seqera Labs}},
title = {{The Software Rewrite Manifesto for the Life Sciences}},
year = {2026},
url = {https://rewrites.bio}
}
@article{cleary2015rtg,
author = {Cleary, John G. and Braithwaite, Ross and Gaastra, Kevin and Trigg, Natalie P. and Fiddes, Ian and Zook, Justin M. and others},
title = {{Comparing variant call files for performance benchmarking of next-generation sequencing variant calling pipelines}},
journal = {bioRxiv},
pages = {023754},
year = {2015},
doi = {10.1101/023754}
}