Skip to content

test(port-parser-vcf): v2 port (re-dispatch) — 15 active tests + 47 blocked-future-work stanzas#174

Open
sitekwb wants to merge 2 commits into
dev-testfrom
port-parser-vcf-redispatch-2026-05-28
Open

test(port-parser-vcf): v2 port (re-dispatch) — 15 active tests + 47 blocked-future-work stanzas#174
sitekwb wants to merge 2 commits into
dev-testfrom
port-parser-vcf-redispatch-2026-05-28

Conversation

@sitekwb

@sitekwb sitekwb commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

v2-paradigm port of ensembl-vep/t/Parser_VCF.t (Parser_VCF). This is a re-dispatch — the original implementer (commit aa08eb3a) stalled mid-cargo-compile without committing any work; the dead branch port-parser-vcf-2026-05-28 has only dev-test merges. This PR is on a fresh branch.

Scope (per porting-tests/detailed_plans/Parser_VCF.md post-Phase-D):

Total Perl coverage: 71 sztywno-1:1 rows (68 substantive + 2 Axis A + 1 Axis B) mapped → 15 active Rust tests + 47 commented future-work + 6 doc-only = 100% sztywno-1:1.

Test plan

  • env -u CONDA_PREFIX cargo test -p datafusion-bio-function-vep --lib pvcf → 9 passing
  • env -u CONDA_PREFIX cargo test -p datafusion-bio-function-vep --test port_parser_vcf → 6 passing
  • No production code modified — all changes inside #[cfg(test)] mod tests block or new test file
  • No engine blocker Add max_batch_rows option to PileupConfig for chunked streaming output #2 work attempted in this port (explicitly out of scope per detailed_plan §"Anti-goals")
  • No golden.vcf, no port_common::run_and_compare_csq, no gen_golden.sh, no mod port_common (v2 standalone rule)
  • Hand-coded assertion values; no docker/VEP runtime dependency
  • PR targets dev-test (per user hard rule: no master/main targets in vepyr repos)

Notes on Q3 reclassification (row #23)

Per user decision 2026-05-28 the Perl minimal=1 flag test CAT/CCT → A/C is reclassified architectural-no-analogue → unit-port. vepyr exposes two trim helpers:

  • vcf_to_vep_allele (allele.rs:283): MNV-preserving — same-length REF/ALT prefix-trim only, no suffix-trim. CAT/CCT → AT/CT.
  • trim_sequences_ensembl (allele.rs:118): full minimizer used by Perl minimal=1. CAT/CCT → A/C with pos+1 / end+1.

The test pvcf_23_a2_minimal_outcome_via_always_on_trimming asserts BOTH outcomes — documenting the API split and pinning the semantic equivalence with Perl minimal=1.

Related

  • Detailed plan: porting-tests/detailed_plans/Parser_VCF.md (post-Phase-D Axis A/B amendments)
  • Per-port plan PR: biodatageeks/vepyr-porting-tests#new (port-parser-vcf-redispatch-plan-2026-05-28)
  • Engine blocker: porting-tests/future-work-vepyr.md "SV //" + 12 misc cluster entries (all already in place; no future-work-vepyr.md modification required by this port)

🤖 Generated with Claude Code

sitekwb and others added 2 commits May 28, 2026 11:37
…le.rs (sztywno 1:1)

Re-dispatch of Parser_VCF.t v2 port (original implementer aa08eb3a stalled).
Adds 9 #[test] functions in src/allele.rs::tests pinning the pure-fn allele
helpers against Perl Parser_VCF.t subtests:

  pvcf_09_deletion_ac_to_a — vcf_to_vep_allele("AC","A")==("C","-")
  pvcf_10_insertion_a_to_ac — vcf_to_vep_allele("A","AC")==("-","C")
  pvcf_11_short_form_del_ignores_svtype — SVTYPE=DEL ignored on short-form
  pvcf_12_short_form_ins_ignores_svlen — SVLEN=1 ignored on short-form
  pvcf_13_multi_alt_snv_pass_through — SNV-only multi-ALT no-trim rule
  pvcf_14_multi_alt_different_first_base — joint prefix=0
  pvcf_15_multi_alt_same_first_base — joint prefix=1, REF→"-", pos shifts
  pvcf_24_minimal_non_minimisable_multi_alt_pass_through — mixed-length pass-through
  pvcf_23_a2_minimal_outcome_via_always_on_trimming — Q3 reclass: CAT→CCT
    yields A/C via trim_sequences_ensembl (Perl minimal=1 equivalent); also
    documents the API split between vcf_to_vep_allele (MNV-preserving) and
    trim_sequences_ensembl (full minimizer).

Per-port plan: porting-tests/plans/2026-05-28-port-parser-vcf.md.
Detailed plan: porting-tests/detailed_plans/Parser_VCF.md (post-Phase-D).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… blocked-future-work

New file tests/port_parser_vcf.rs covers the non-unit-port slice of
Parser_VCF.t v2 port:

6 active #[tokio::test] integration tests (use noodles VcfTableProvider):
  pvcf_05_06_07_basic_parse_and_headers — header preservation + rows 0/1
  pvcf_08_non_variant_rows_kept_in_batch_null_alt — vepyr keeps non-variant
    rows at parser level (annotate-time skip downstream; documented deviation)
  pvcf_16_stubby_row_parses — minimal-INFO row parses as SNV
  pvcf_18_non_variant_row_default_kept_with_null_alt — default-mode keep
  pvcf_69_non_numeric_pos_row_dropped_or_errored — noodles errors on bad POS
  pvcf_a1_b1_star_allele_in_multi_alt_parsed_to_both_alts — A1/B1 Phase D row

6 architectural-no-analogue rows documented at top:
  #3 (Parser::VCF Rust class), #4 (parser accessor),
  #19/#21/#22 (* allele_string preservation), #23 (minimal=1 flag).

47 blocked-future-work stanzas at bottom, organized in 13 clusters per
the detailed_plan (SV/max_sv_size/CPX/ME/CNV/BND/TR/GP/individual/
individual_zyg/allow_non_variant/dont_skip/<DEL:*>). Each stanza names
the Perl row, the vepyr gap, the engine blocker # or sub-blocker, the
future-work-vepyr.md entry title, and a commented-out test body.

Per-port plan: porting-tests/plans/2026-05-28-port-parser-vcf.md.
Detailed plan: porting-tests/detailed_plans/Parser_VCF.md (post-Phase-D).

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