Skip to content

Add selenocysteine (Sec/U) regression tests (closes #42) - #401

Merged
iskandr merged 1 commit into
mainfrom
selenocysteine-regression-test-42
Jul 9, 2026
Merged

Add selenocysteine (Sec/U) regression tests (closes #42)#401
iskandr merged 1 commit into
mainfrom
selenocysteine-regression-test-42

Conversation

@iskandr

@iskandr iskandr commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Triages and resolves #42 ("Check which apparent stop codons are actually selenocysteines", 2015).

Finding: the described bug is gone. varcode no longer treats an internal selenocysteine UGA as a stop codon. It annotates against Ensembl's reference protein_sequence — which is full-length with a U at the recoded position — rather than re-translating the coding sequence with the standard table, so selenoprotein variants are not mis-annotated as StopLoss / UTR effects.

Verification (GPX1, ENST00000419783, Sec at residue 49)

Case Variant Result
Substitution at the Sec codon chr3:49358132 T>A (UGA→UGU) Substitution p.U49C, aa_ref="U" — missense, not StopLoss
Substitution downstream chr3:49357702 G>A p.R100W — correct numbering (read-through)
In-frame deletion upstream (re-translation path) chr3:49358144 CAC>· full-length mutant protein, retains U

Notes

  • Test-only; no library changes. Passes under both the fast and protein_diff annotators.
  • Pinned to cached_release(81) per suite convention.

Closes #42

https://claude.ai/code/session_01VNtZRyKZ7u9jiMGPQEbx4c

#42 (2015) observed varcode treating selenocysteines as stop codons,
producing spurious StopLoss / UTR effects for selenoproteins. That no
longer happens: varcode annotates against Ensembl's reference
protein_sequence (full-length, with U at the recoded UGA) rather than
re-translating the CDS with the standard table.

Verified on GPX1 (ENST00000419783, Sec at residue 49) and locked in with
regression tests covering the three paths:
- substitution AT the Sec codon -> Substitution p.U49C (aa_ref="U"),
  not StopLoss/UTR;
- substitution downstream -> p.R100W with correct numbering (read-through);
- in-frame deletion upstream -> full-length mutant protein that retains U.

Passes under both the fast and protein_diff annotators.

Closes #42
@iskandr
iskandr merged commit 186b9d2 into main Jul 9, 2026
8 checks passed
@iskandr
iskandr deleted the selenocysteine-regression-test-42 branch July 9, 2026 02:14
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.

Check which apparent stop codons are actually selenocysteines

1 participant