de2ccf6d827865f11d3c8edd9ceeb1b6394a7380
lrnassar
  Tue Apr 21 18:22:59 2026 -0700
PrimateAI-3D: label items by nucleotide change, add aaChange field and HTML mouseover.

Variant analysts typically work at the nucleotide level, and the current
item label (amino acid change) collapses distinguishable variants: ~17%
of items share their (chrom, pos, AA-change) tuple with another item
because of codon degeneracy (e.g. three C>A, C>G, C>T at the same
position can all appear as "M>I"). Labeling by nucleotide change makes
every item uniquely distinguishable (0.0% collisions on hg38, 0.1% on
hg19 from overlapping transcripts).

- primateAi.as: field 4 (name) is now "Nucleotide change (e.g. T>C)";
new field aaChange (placed before ref/alt) holds the amino acid
change.
- primateAiToBigBed.py: write name = "{ref}>{alt}", new aaChange column,
and an HTML mouseover with terse labels (Var/AA/Score/Perc/Pred) and
a colored prediction string.
- primateAi.ra: add labelFields name,aaChange and defaultLabelFields
name so users can toggle the on-feature label between nt change
(default) and AA change.
- primateAi.html: expand Display Conventions with the label-convention
rationale and a legend for each mouseover field.

refs #37274

diff --git src/hg/makeDb/trackDb/human/primateAi.ra src/hg/makeDb/trackDb/human/primateAi.ra
index 0c5a835abd4..46b4e7547eb 100644
--- src/hg/makeDb/trackDb/human/primateAi.ra
+++ src/hg/makeDb/trackDb/human/primateAi.ra
@@ -1,24 +1,26 @@
 track primateAi
 shortLabel PrimateAI-3D
 longLabel PrimateAI-3D Pathogenicity Predictions for Missense Variants
 type bigBed 9 +
 parent predictionScoresSuper
 bigDataUrl /gbdb/$D/primateAi/primateAi.bb
 itemRgb on
 visibility dense
 tableBrowser off
 scoreFilter 0
 scoreFilterLimits 0:1000
 mouseOverField _mouseOver
 filterValues.prediction benign|Benign,pathogenic|Pathogenic
 filterLabel.prediction Prediction
 filter.percentile 0
 filterLimits.percentile 0:1
 filterByRange.percentile on
 filterLabel.percentile Percentile score
 filter.scorePAI3D 0
 filterLimits.scorePAI3D 0:1
 filterByRange.scorePAI3D on
 filterLabel.scorePAI3D PrimateAI-3D raw score (clinical threshold 0.821)
+labelFields name,aaChange
+defaultLabelFields name
 maxWindowToDraw 2000000
 urls gene="https://www.ensembl.org/Homo_sapiens/Transcript/Summary?t=$$" refSeq="https://www.ncbi.nlm.nih.gov/nuccore/$$"