feat(cli): replace --skip-symbolic-alts with composable --no-symbolic / --no-breakend#53
Merged
Conversation
… ILEN) Breakend (BND) ALTs in mate-pair / single-breakend notation (e.g. `G[chr2:321[`, `.TGCA`) are a distinct VCF 4.x ALT class from symbolic `<...>` alleles, so `is_symbolic` did not flag them. But like symbolic alleles they are not expandable into nucleotides — the bracket/colon/ position bytes corrupt personalized DNA buffers in haplotype consumers. Previously a breakend slipped past every guard: `symbolic_ilen` computed the literal `len(ALT) - len(REF)`, so it masqueraded as a large insertion, evaded `~is_imprecise`, and reached consumers like genvarloader. - Add public `is_breakend` expression (VCF §5.4 grammar). - `symbolic_ilen` now returns null for breakend ALTs, so they are also `is_imprecise` and excluded from `is_snp`/`is_indel`. Flows through both the VCF and PGEN index-build paths. - Document the haplotype-safe filter `~is_symbolic & ~is_breakend` in SKILL.md (required for public-API changes). - Add a breakend record to the `symbolic` test fixture and extend the oracle/persisted-index tests to cover the path on generated data. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… predicates Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…reakend Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The setter previously mutated only _filter, allowing a mismatched (filter, pl_filter) pair that the constructor forbids. It now accepts a (filter, pl_filter) tuple (or None to clear both), validates the both-or-neither invariant via a shared _check_filter_pair helper, and invalidates the in-memory index. Getter still returns the callable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
genoray write --skip-symbolic-altsflag with two independent, composable flags--no-symbolicand--no-breakend, so users can drop un-injectable ALT classes (symbolic alleles like<DEL>, breakends likeG[chr1:500[) independently or together._record_is_symbolic/_record_is_breakendtogenoray/exprs.pythat mirror the existingis_symbolic/is_breakendpolars exprs (sharing_BND_PATTERN), keeping the cyvcf2 record callable and the polars index filter in parity.(record callable, polars expr)for the VCF path (both required, or neither) and a single polars expr for PGEN.Test Plan
pixi run test— 347 passed, 16 xfailedruff check+ruff format --checkcleangenoray write --helpshows--no-symbolic/--no-breakend, no--skip-symbolic-altsor--no-no-*--no-breakend/ combined--no-symbolic --no-breakendacross VCF, plus--no-breakendPGEN🤖 Generated with Claude Code