0151d00a4a1d73a78c35f6158c6c936ff338faeb
max
  Fri Apr 24 10:37:34 2026 -0700
NMD Escape: MANE subtrack, Rule 1 bug fix, transcript filter. refs #33737

- Add nmdEscMane subtrack (MANE Select Plus Clinical 1.5), built from
/gbdb/hg38/mane/mane.bb. Reuses nmdEscTranscripts.html.
- Fix Rule 1: measure 50 bp upstream of the transcript's last splice
junction (including 3'UTR introns) rather than stripping 3'UTR from
the exon list first. The old logic painted the entire last CDS exon
as NMD-escape whenever the transcript had only one CDS exon, even
when a 3'UTR intron sat far past the stop codon (e.g. NBDY: 207 bp
of CDS over-painted for a junction 2.6 kb past the stop).
- Add --rule1-mode {cds,mrna} (default cds): cds counts only CDS bp
on the walk-back (paints up to 50 bp of CDS matching the rule label
literally); mrna counts mRNA bp and clips to CDS (tracks the 55 bp
rule literature). Documented in makeDoc.
- Rule 4: when a 3'UTR intron exists, the last CDS-containing exon
has a downstream EJC and is now eligible for the long-exon rule.
- Mouseover lists contributing transcript accessions when 1-3 items
collapse into a region; falls back to a count above that.
- Add filterText/filterType/filterLabel on all three escape subtracks
so a user can narrow the display to one transcript.
- genePredNmdEsc: --gene-sym-field (default 17 for Gencode; pass 18
for MANE, whose HGNC symbol lives in bigGenePred geneName2).
- Add findShortTxLongUtrIntron.py helper for finding MANE transcripts
with long UTR introns (used to pick NMD edge-case test cases).

Post-fix collapsed-region counts (--rule1-mode=cds):
MANE 1.5:        67,752
Gencode V49:    233,375
RefSeq Curated: 112,356

diff --git src/hg/makeDb/trackDb/human/hg38/nmd.ra src/hg/makeDb/trackDb/human/hg38/nmd.ra
index fb8bc855e66..b7a9dc837c3 100644
--- src/hg/makeDb/trackDb/human/hg38/nmd.ra
+++ src/hg/makeDb/trackDb/human/hg38/nmd.ra
@@ -1,46 +1,67 @@
 track nmd
 shortLabel NMD Escape
 longLabel NMD Escape: Predicted regions where premature termination codons escape NMD
 group genes
 type bed 4
 visibility hide
 superTrack on
 pennantIcon New red ../goldenPath/newsarch.html#042226 "Released Apr. 22, 2026"
 
+        track nmdEscMane
+        shortLabel NMD Escape MANE
+        longLabel NMD escape predictions: MANE Select Plus Clinical transcripts
+        parent nmd off
+        bigDataUrl /gbdb/hg38/nmd/nmdEscMane.bb
+        visibility hide
+        type bigBed 9 +
+        mouseOverField mouseover
+        html nmdEscTranscripts
+        filterText.transcripts *
+        filterType.transcripts wildcard
+        filterLabel.transcripts Filter on transcript ID (e.g. "*ENST00000269305*")
+        dataVersion MANE 1.5
+        priority 1.4
+
         track nmdEscGencode
         shortLabel NMD Escape Gencode
         longLabel NMD escape predictions: Gencode transcripts
         parent nmd off
         bigDataUrl /gbdb/hg38/nmd/nmdEscRegions.bb
         visibility hide
         type bigBed 9 +
         mouseOverField mouseover
         html nmdEscTranscripts
+        filterText.transcripts *
+        filterType.transcripts wildcard
+        filterLabel.transcripts Filter on transcript ID (e.g. "*ENST00000269305*")
         # this could use a text file one day with the version
         dataVersion Gencode V49
         priority 1.5
 
         track nmdEscNcbiRefSeq
         shortLabel NMD Escape RefSeq
         longLabel NMD escape predictions: NCBI RefSeq Curated transcripts
         parent nmd on
         bigDataUrl /gbdb/hg38/nmd/nmdEscNcbiRefSeq.bb
         visibility pack
         type bigBed 9 +
         mouseOverField mouseover
         html nmdEscTranscripts
+        filterText.transcripts *
+        filterType.transcripts wildcard
+        filterLabel.transcripts FIlter on transcript ID (e.g. "NM_005228*")
         # this could use a text file one day with the version
         dataVersion GCF_000001405.40-RS_2025_08
         priority 1.6
 
         track nmdDetectiveA
         shortLabel NMDetective-A
         longLabel NMDetective-A: Random forest prediction of NMD efficiency (Lindeboom 2016)
         parent nmd off
         bigDataUrl /gbdb/hg38/nmd/NMDetectiveA.bw
         type bigWig
         visibility hide
         color 0,128,255
         autoScale off
         viewLimits -1:1
         maxHeightPixels 128:32:8