Repository navigation
Add combine_cis_snvs transform and VCF spanning-deletion provenance (11.20.0) - #758
Merged
Merged
Conversation
…11.20.0) Closes #368, #264. - Implement varcode.transforms.combine_cis_snvs with explicit phase/sample scope, CDS-relative codon membership across both strands and nonzero UTRs, single-exon contiguity (no cross-intron MNV collapse), strict cross-transcript compatibility (declining dual-frame loci like CDKN2A without lex-first tie-breaking), multi-sample/haplotype preservation, reference-validated gap bases, and full source_variants/metadata provenance. - Retain VCF '*' spanning-deletion placeholder provenance via SpanningDeletionRecord and VariantCollection.spanning_deletion_records / spanning_deletions_dataframe() without creating independent variants, protein consequences, or extra max_variants counts; link upstream_deletion only when source positional and sample/phase evidence uniquely resolves it. - Bump version to 11.20.0 and update CHANGELOG, docs, and typing checks.
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
Closes #368 and #264, bumping Varcode to
11.20.0.1. Provenance-preserving
combine_cis_snvstransform (#368)varcode.transforms.combine_cis_snvs(vc, phase_resolver=None, *, sample=None)(also exported at the package root and documented indocs/transforms.mdanddocs/api_variants.md).phase_resolverorsample(mutually exclusive), using allele/sample-awarequery_in_cisrather than rawPSequality.spliced_offset - transcript.first_start_codon_spliced_offseton complete coding transcripts, verified on both strands includingTP53(-strand, 5' UTR = 190, not divisible by 3).CFTRexon 1→2,TP53exon 2→3) are left as separate SNVs.CDKN2Ap16INK4a vs p14ARF) decline the reduction with a warning.reference_rangeand verify every member'srefbase against the reference.1/1+1|0merges that would lose the second haplotype and declines multi-sample phase/genotype conflicts while allowing compatible somatic (0/0normal) or germline pairs; skips same-position multi-allelic alternatives; idempotent; demonstrates exact consequence equivalence against the haplotype path.2. VCF
*spanning-deletion placeholder provenance (#264)SpanningDeletionRecord(DataclassSerializable, exported at the package root),VariantCollection.spanning_deletion_records, andVariantCollection.spanning_deletions_dataframe().*excluded as an independently annotatableVariant(no independent protein consequence and nomax_variantscount), while preserving original VCF coordinates,alt_allele_index,gt_allele_index,vcf_alt_alleles,id,qual,filter,info,sample_info, andsourcefor both placeholder-only and mixed-ALT rows.upstream_deletiononly when source positional and sample/phase evidence uniquely resolves a loaded deletion ("resolved","unresolved", or"ambiguous"), leaving filtered/absent/trans-phased/ambiguous deletions explicitly unlinked.# spanning_deletion_records=...), set operations (union/intersection/difference), and collection transforms.Verification
./lint.sh(ruff + mypy across 16 source files): passmkdocs build --strict: pass./test.shsuite including newtests/test_transforms_combine_cis_snvs.pyandtests/test_spanning_deletion_provenance.py: pass