Skip to content

Release v1.0.4: 89/89 Full-Corpus VarDictJava v1.8.3 Parity Across Deep WGS, Ultra-Deep MRD, RNA-Seq, CRAM, and Amplicon Panels

[!NOTE] Historical Release Document: This document records the release certification for v1.0.4 (engine fingerprint 552856835a1eec01). For the current v1.0.6 release certification (engine fingerprint 5865a2a0b24a8c17), see docs/release/v1.0.6-pr.md.

Target Branch: main
Source Branch: release/v1.0.4
Release Fingerprint: 552856835a1eec01 (perf_fingerprint 9346a6e5419cc5e2)
Repository: https://github.com/palakpsheth/VarDictRust
Author / Maintainer: Palak Sheth palakpsheth@gmail.com
Governing Manifesto: rewrites.bio
Acceptance Gate: 8/8 Items PASS (harness/acceptance.sh)
Validation Receipt: validated vs VarDictJava 1.8.3, dataset micro + s1a-s9 + 17-modality extended + 18-slice multimodal + HG008/SEQC2/HG002/Amplicon + 89-job 12-cell full-corpus GCP sweep, cmd bash harness/pr_check.sh && bash harness/acceptance.sh


Overview

This pull request prepares and certifies VarDictRust v1.0.4 off main (e09b845), consolidating the ungated parity-restoring fixes (Bug A–Bug H and adaptive region tiling, Issue #42 / PR #43) that achieved 89 / 89 MATCH (fp=0, fn=0 across 1,202,444 compared oracle .var/.vcf/splice records and 36 multi-slice/mode suites under float tolerance \(\varepsilon = 10^{-6}\)) against VarDictJava v1.8.3 (commit 0886261, Perl submodule 009e017) across the 12-cell full-corpus validation sweep (deep WGS, somatic WGS/WES, 7,361x–173,132x ultra-deep MRD, 51.8 GiB HG002 STAR RNA-seq -i splice & cDNA, CRAM 3.0 twins, and Tier-P AML panels).


Key Additions & Fixes in v1.0.4

1. Full-Corpus Parity-Restoring Engine Fixes (Bug A–Bug H & Adaptive Tiling, Issue #42, PR #43)

  • Bug A — Secondary LoadedRegion Selection in CigarParser (crates/vardictrust-core/src/cigar/parse.rs, src/reference.rs):
  • Selects the covering (idx, lr) in reference.region_sequences (region_slice_for_span) during structural-variant partial_pipeline re-parsing and spliced alignments (CigarParser.java:181–193, 257).
  • Bug B — Reference siteEnd Lookahead Truncation (crates/vardictrust-core/src/reference.rs):
  • Truncates bases to site_end = bases.len() - 17 after seeding PendingSeedChunk (ReferenceResource.java:106–112) so the trailing SEED_1 (17 bp) lookahead is excluded from region_sequences and reference_sequences while remaining indexable by overlapping subsequent regions.
  • Bug C — CRAM Soft-Masked Base Normalization & Omitted NM Reconstruction (crates/vardictrust-core/src/bam.rs):
  • Uppercases CRAM reference-matching bases decoded against soft-masked lowercase FASTA contigs (a/c/g/t/n → A/C/G/T/N) and reconstructs omitted CRAM 3.0 (store_nm=0) NM edit distance tags via compute_cram_nm per SAMtags §1.5.
  • Bug D — Single-Sample -f 0 Perl Falsy 0.02 Fallback vs -f 0.0 Truthy Zero (crates/vardictrust/src/cli.rs, crates/vardictrust-core/src/output/vcf.rs):
  • Replicates var2vcf_valid.pl:21 (my $Freq = $opt_f ? $opt_f : 0.02;) via valid_freq_threshold(config) so -f 0 ("0") falls back to 0.02 while -f 0.0 / -f 0e0 preserve 0.0.
  • Bug E — Somatic v2nt.is_noise() In-Place Coverage Propagation (crates/vardictrust-core/src/postprocess/somatic.rs):
  • Propagates v2nt.is_noise() in-place mutations (total_pos_cov -= pos_coverage) back into v2.var_desc_to_variant and v2.variants so subsequent tumor alleles at multi-allelic somatic loci observe the mutated v2.variants[0] (SomaticPostProcessModule.java:172–186).
  • Bug F — <dupN> \(3'\) Flank substr Offset in realignins (crates/vardictrust-core/src/realign.rs):
  • Uses start_idx = sv_flanking (50) matching VariationRealigner.java:744–746 (substr(ins3, SVFLANK - ins3.length())).
  • Bug G — \(5'\) Candidate Deletion SV Post-Decrement Coverage Lookup (crates/vardictrust-core/src/sv.rs):
  • Queries var_data.ref_coverage.get(&(p5_adj + 1)) after p5-- in find_sv (StructuralVariantsProcessor.java:732, 748).
  • Bug H — Ultra-Deep Java --fisher (FisherExact::new_java) Parity (crates/vardictrust-core/src/stats/fisher.rs, src/output/table.rs, src/output/vcf.rs, src/lib.rs):
  • Emulates FisherExact.java:72, 112, 129 in --fisher mode with 7-decimal logdc banker's rounding (round_half_even(value, 7)) and OpenJDK DoubleStream.sum() Kahan-Babuška compensated summation (java_stream_sum).
  • Adaptive Region Tiling (<= 1 Mbp Untiled / > 1 Mbp 100 kbp Tiled, crates/vardictrust-core/src/lib.rs, crates/vardictrust/src/cli.rs):
  • Executes BED intervals <= 1 Mbp (DEFAULT_UNTILED_SPAN_MAX) as single untiled intervals matching VarDictJava while tiling multi-megabase intervals > 1 Mbp into 100 kbp (DEFAULT_TILE_SIZE) windows to preserve < 1.5 GiB bounded WGS memory; raises MAX_TILE_SIZE to 500 Mbp.
  • Golden Store vardictcpp Caching (harness/scale_bench.sh, harness/run_integration.sh):
  • Routed all vardictcpp invocations in scale_bench.sh (scale-th*, scale-R*) and run_integration.sh through harness/golden_store.sh, with isolated GOLDEN_STORE_DIR in harness/tests/test_scale_bench.sh and strict enforcement in harness/tests/test_golden_wiring.sh.

2. Full-Corpus 12-Cell Validation Sweep (89 / 89 MATCH, Issue #42 / PR #43)

  • Verified 89 / 89 MATCH (fp=0, fn=0 across 1,202,444 compared oracle .var/.vcf/splice records and 36 multi-slice/mode suites) across all 12 full-corpus sweep cells:
  • sweep_tierp_SRR15006540 (135,145 BED regions, 30,267x AML panel, 16,031 .var & 15,912 .vcf): 2 / 2 MATCH
  • sweep_tierp_SRR8657348 (773,667 BED regions, whole-panel covered BED, 54,448 .var & 53,224 .vcf): 2 / 2 MATCH
  • sweep_tierp_somatic_76_86 (105,949 BED regions, 29,389x paired somatic, 14,126 .var & 14,000 .vcf): 2 / 2 MATCH
  • sweep_tierp_13modes (14 single/amplicon/somatic/MRD/Fisher/SV/CRAM sub-arms, 4,463 .var rows): 14 / 14 MATCH
  • sweep_rna_hg002_52gb (51.8 GiB HG002 STAR RNA-Seq -i splice 12,668 rows & cDNA 1,230 .var rows): 2 / 2 MATCH
  • sweep_R_chr1_full (direct whole-chromosome -R chr1:1-249250621, 249.25 Mbp, 4,705 .var rows): 1 / 1 MATCH
  • sweep_4targets_full (full Amplicon 2, HG002 Deep WGS 48,928, HG008 Somatic WGS 18,426, SEQC2 WES 623,444 — 690,800 total .vcf variants): 4 / 4 MATCH
  • sweep_hg002_chr20_exome (full chr20 Exome hg002.exome.20.bam, 4,469 targets, 8,330 .var & 8,233 .vcf): 2 / 2 MATCH
  • sweep_span_chr1_f0 (chr1:0-10,000,000 10 Mbp continuous window at -f 0, 7,077 .var & 7,032 .vcf): 2 / 2 MATCH
  • sweep_wgs_mrd_matrix (24 sub-arms across HG002 60x WGS, HG008 Somatic WGS, HG005 300x WGS chr3/chr6/chr21, SEQC2 Somatic at -f 0.001, -f 0, --fisher — 172,995 records): 24 / 24 MATCH
  • sweep_ultradeep_mrd_stress (30 sub-arms across 7,361x–173,132x single, paired somatic 45,707x, HG008 14,964x, HG002 7,361x, RNA 173,132x at -f 0.0005, -f 0.001, -f 0 --fisher — 117,094 records): 30 / 30 MATCH
  • sweep_multimodal_and_cram_twin (17/17 extended coverage modes, 18/18 multimodal slices, G4 HG008 CRAM twin, E2 SEQC2 Somatic CRAM twin 40 variants): 4 / 4 MATCH

Acceptance Gate & PR Check Certification

Both bash harness/pr_check.sh (6/6 stages) and bash harness/acceptance.sh (8/8 items) pass under certified engine fingerprint 552856835a1eec01 (perf_fingerprint 9346a6e5419cc5e2):

item 1: PASS (Unit tests: 293 total workspace tests: 241 lib + 2 amplicon_stream_mem + 2 cram_stack + 15 cli + 23 flags + 3 profile_smoke + 5 robustness + 1 thread_determinism + 1 version)
item 2: PASS (Level 2: 91/92 static expected matches + UB-4 isolated; micro live oracle smoke.sh PASS)
item 3: PASS (Level 3: 17/17 benchmarks MATCH: micro + 10 slices + HG008 + SEQC2 exome + SEQC2 slices + HG002 + Amplicon + 17-mode extended + 18-slice multimodal)
item 4: PASS (Robustness: crash corpus + HG008 CRAM twin PASS)
item 5: PASS (Level 5 Scale & Perf-Budget PASS)
item 6: PASS (Level 4 Truth set: HG008, SEQC2, HG002, HG005, NA24385 b37 EQUAL across all 5 cohorts)
item 7: PASS (Hygiene: fmt, clippy, audit, deny, gitleaks 0 leaks)
item 8: PASS (Distribution: --version metadata 1.0.4, musl-ci PASS)
fingerprint 552856835a1eec01

Key Documentation & Validation Artifacts