0f23d17640ca30e2c9ee456c7e15966cabd3bc57
max
  Mon Sep 7 23:32:24 2026 -0700
Position box: let a hyphen separate a range of codons, e.g. "BRCA1 100-200"

A bare number after a gene symbol has always meant a codon, and "KAT6A 495-533"
was already accepted -- it just landed on codon 495 and dropped the rest, the
same silent truncation that the underscore form had. A hyphen now separates a
range wherever the coordinates are protein: after a gene symbol with no prefix,
and after an explicit p. with a symbol or a transcript accession.

The hyphen stays out of c. and n. terms, where HGVS already uses it for an
intron offset. KAT6A c.1483-1599 is still the single base 1599 nt before
c.1483, not codons 1483 to 1599, and there are now regression tests pinning
both readings so the two do not drift into each other.

refs #38285

diff --git src/hg/lib/tests/input/hgvs/validTerms.txt src/hg/lib/tests/input/hgvs/validTerms.txt
index 2c5954c3f80..a67a0295fcb 100644
--- src/hg/lib/tests/input/hgvs/validTerms.txt
+++ src/hg/lib/tests/input/hgvs/validTerms.txt
@@ -1,41 +1,52 @@
 # A variant that is famously known as "MTHFR C677T" or "MTHFR 677C>T" -- but the 677 is incorrect (from an old sequence ~1995):
 NM_005957.4:c.665C>T
 # Same variant in LRG transcript, protein and genomic coords:
 LRG_726t1:c.665C>T
 LRG_726p1:p.Ala222Val
 LRG_726:g.14783C>T
 
 # These three are equivalent (although p. is less specific):
 NM_003002.3:c.276C>A
 NP_002993.1:p.Asp92Glu
 NP_002993.1:p.D92E
 
 # This is not HGVS but seems to be a commonly requested format and is easy to transform into the internal representation of HGVS:
 ALK G1494E
 
 # More gene symbol HGVS-ish
 RERE:Thr758Serfs
 GBA1:p.Leu29Alafs*18
 H6PD Val320=
 MTHFR Pro101_Gly102insLeuTyrIleAspValThrTrpHisProAlaGlyAspPro
 YARS1 p.Val153_Val156del
 PLOD1 Glu532del
 PPT1 p.Gln91_Cys96delinsPhe
 PLOD1:p.532
 # From a user via b0b:
 NM_198056.3:pAla735Val
 NM_198056.3:pArg1512Trp
 
 NM_003098.2:c.287G>C
 NM_007294.3:c.2231C>A
 NM_007294.3(BRCA1):c.2231C>A
 
 # Bare codon numbers and ranges of codon numbers, refs #38285
 KAT6A p.495
 KAT6A p.495_533
 KAT6A p.Lys495_Ser533
 NM_006766.5 p.495
 NM_006766.5 p.495_533
 ENST00000265713.8 p.495
 ENST00000265713.8 p.495_533
 KAT6A c.1483_1599
+KAT6A 495
+KAT6A 495_533
+# A hyphen is a range separator in protein coordinates only, refs #38285
+KAT6A 495-533
+KAT6A p.495-533
+NM_006766.5 p.495-533
+ENST00000265713.8 p.495-533
+# ...but in c. and n. terms a hyphen is still an intron offset, not a range:
+# this one must stay a single base 1599 nt before c.1483, not codons 1483..1599
+KAT6A c.1483-1599
+KAT6A n.100-200