Skip to content

port(OutputFactory_VCF.t): 24-row v2 port + 3 PH folded HGVS rows + Axis B#177

Open
sitekwb wants to merge 3 commits into
dev-testfrom
port-output-factory-vcf-2026-05-28
Open

port(OutputFactory_VCF.t): 24-row v2 port + 3 PH folded HGVS rows + Axis B#177
sitekwb wants to merge 3 commits into
dev-testfrom
port-output-factory-vcf-2026-05-28

Conversation

@sitekwb

@sitekwb sitekwb commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

v2-paradigm port of ensembl-vep/t/OutputFactory_VCF.t (52 substantive Perl subtests) plus 5 Parser_HGVS folded rows (Decision §1.B=A 2026-05-27).

Coverage parity: 24/50 Perl-denominator = 48% (27/55 = 49% incl. PH folds). Status: 🟡 DONE_WITH_CONCERNS.

Port-time findings (DONE_WITH_CONCERNS)

Two new future-work entries created (see sibling porting-tests PR):

  1. bio-function-ranges: optimize remaining non-join range operators #36/perf: Optimize remaining non-join range operators #37/SIFT/PolyPhen eager loading causes 20GB+ memory usage on chr1 #38 trash existing CSQ: vepyr panics with SchemaError(DuplicateQualifiedField) when input VCF declares ##INFO=<ID=CSQ,...>. Real engine gap — proper CSQ-projection drop is needed. Locked in via Axis B B3 regression guard.
  2. Parquet annotate_vep: avoid full-chrom context scans and wide materialization on cache misses #43 ##VEP= preamble line: vepyr emits only ##INFO=<ID=CSQ,...> Format line, no provenance ##VEP= line.

Both deferred to future-work entries in porting-tests/future-work-vepyr.md (S effort each).

Test plan

  • cargo test -p datafusion-bio-function-vep --lib: 847 passed, 0 failed
  • cargo test -p datafusion-bio-function-vep --test port_output_factory_vcf: 13 passed, 0 failed
  • Mac quirk: env -u CONDA_PREFIX used for all cargo invocations
  • No golden.vcf, no gen_golden.sh, no docker dependency in tests
  • All blocked-future-work + architectural-no-analogue rows documented at bottom of test file

Detailed plan: porting-tests/detailed_plans/OutputFactory_VCF.md (post-Phase-D + Parser_HGVS folds)
TDD plan: porting-tests/plans/2026-05-28-port-output-factory-vcf.md

🤖 Generated with Claude Code

sitekwb and others added 3 commits May 28, 2026 12:07
…ervation

Ports the following rows from porting-tests/detailed_plans/OutputFactory_VCF.md:
- Subtests #15, #17, #18, #19 — audit-trail re-citations of existing
  csq_escape micro-tests for sztywno-1:1 traceability.
- Subtest #21 — string '0' preserved (not coerced to empty).
- Subtest #22 — numeric 0 stringifies to "0" and passes csq_escape unchanged.
- Subtest #23 — empty-string vs numeric-0 distinction confirmed at the
  csq_escape layer.
- Subtest #28 — escape of mixed invalid chars (',', '|', ';', whitespace)
  in transcript stable-id; locks in vepyr's per-character whitespace
  semantic ('A__G' for two spaces) which diverges from Perl's run-collapse
  ('A_G'). Divergence tracked under subtest #20 firm blocked-future-work.

8 new tests, all passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…s + Axis B

Ports the following rows from porting-tests/detailed_plans/OutputFactory_VCF.md:

Perl-side:
- Subtest #4 — AnnotateVcfConfig::default() constructor sanity (vcf_sink.rs).
- Subtest #7 — refseq BAM_EDIT block at positions 28-32 (golden_benchmark.rs).
- Subtest #8 — default fields list first-22-tuple matches Perl-era layout
  (Allele through SYMBOL_SOURCE), with vepyr extending to 74 fields total.
- Subtest #10 — merged mode dedups SOURCE (exactly one occurrence) and
  interleaves REFSEQ_MATCH/SOURCE/REFSEQ_OFFSET at the canonical positions.

Axis B (vepyr-side accretive invariants):
- B1 — pipe-count invariant: pipe-joined empty CSQ has field_count - 1 pipes
  across all modes (default/everything/refseq/merged).
- B2 — Ensembl-mode field list excludes all REFSEQ_* fields and BAM_EDIT
  (catches accidental field-list bleed across modes).

6 new tests, all passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…+ Axis B

Adds tests/port_output_factory_vcf.rs covering the integration-port and
e2e-port subtests from OutputFactory_VCF.t plus the Parser_HGVS folded
integration rows (Decision §1.B=A 2026-05-27).

Live integration tests (10 subtests passing):
- #24 count_matches_input — one output row per input row
- #25 first_row_csq_shape — ENST00000307301/352957 + multi-consequence
  invariants at chr21:25585733 C>T (rs142513484)
- #26 last_row_multi_feature — ≥4 CSQ groups at chr21:25607517
- #27 sparse_row_8_col_output — 8-col VCF + CSQ on minimal INFO=. row
- #29 everything_mode_per_group_pipe_count — 80-field --everything layout
- #40 bcsq_preserved — input BCSQ=foo survives (only literal CSQ stripped)
- #42 preamble_shape — ##fileformat / ##INFO=<ID=CSQ,...> / #CHROM\\tPOS\\t
- #44 intergenic_sentinel_at_isolated_position — relaxed: vepyr emits
  intergenic_variant sentinel rather than empty INFO at transcript-free
  loci
- #51 input_header_passthrough — ##contig/##INFO=<ID=SVLEN/SVTYPE,...>
  preserved through annotate

Parser_HGVS folded (3 rows passing):
- PH-2 coding_hgvsc_ensembl — chr21:25585733 C>T →
  ENST00000352957.*:c.991G>A
- PH-3 coding_utr_hgvsc — UTR-relative c.*18G>A on ENST00000307301.*
- PH-4 protein_hgvsp — ENSP00000284967.*:p.Ala331Thr (three-letter form)

Port-time reclassifications (4 subtests firm-downed to blocked-future-work):
- #36/#37/#38 trash_existing_csq: vepyr panics with
  DuplicateQualifiedField when input declares ##INFO=<ID=CSQ,...>.
  Real engine gap — proper CSQ-projection drop is needed. See
  Axis B B3 test which locks in the observed panic-on-CSQ-header
  behaviour as a regression guard.
- #43 ##VEP= preamble line: vepyr's csq_header_description emits no
  standalone ##VEP= provenance line; only the ##INFO=<ID=CSQ,...> entry.

Port-time addition:
- Axis B B3 axis_b_b3_annotate_to_vcf_panics_when_input_declares_csq_header:
  locks in the observed DuplicateQualifiedField panic so a future
  CSQ-projection fix surfaces as a test transition.

Architectural-no-analogue prose stubs for #34/#35 (non-VCF input parser)
and #52/#53 (web_output sidecar) are documented at the bottom of the
file with substantive justification per v2 paradigm.

Blocked-future-work prose stubs for #5/#6/#11/#14/#16/#20/#31/#32/#33/
#39/#41/#43/#45-#50/#54 plus PH-1/PH-5 are documented at the bottom of
the file with future-work entry references.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant