Skip to content

fix: derive omitted RLE sequence when translating to HGVS - #705

Open
chenyangsu wants to merge 1 commit into
ga4gh:mainfrom
chenyangsu:fix/to-hgvs-rle-without-sequence
Open

chenyangsu wants to merge 1 commit into
ga4gh:mainfrom
chenyangsu:fix/to-hgvs-rle-without-sequence

Conversation

@chenyangsu

Copy link
Copy Markdown

translate_to(allele, "hgvs") raises AttributeError: 'NoneType' object has no attribute 'root' for a ReferenceLengthExpression allele whose sequence was left out by rle_seq_limit (the case in #344). test_rle_seq_limit currently expects this error. _to_spdi already rebuilds the sequence with denormalize_reference_length_expression.

HgvsTools._to_sequence_variant now does the same when sequence is missing. Alleles that carry a sequence are unchanged. Happy to raise a clearer error instead if you prefer.

Testing: test_rle_seq_limit now expects ["NC_000013.11:g.32331043_32331094dup"] for the allele without a sequence. It fails on main and passes with the change. Full suite: 224 passed.

@chenyangsu
chenyangsu requested review from a team as code owners November 26, 2026 20:45

This branch has not been deployed

No deployments
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