7d86d32d1dd31afc7508edb2ee157a583cc5e6e3
max
Mon May 19 06:46:24 2025 -0700
improve exon mouseover for genePreds after feedback from QA, refs #33749
diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c
index 35869b057d2..46dff1be32e 100644
--- src/hg/hgTracks/simpleTracks.c
+++ src/hg/hgTracks/simpleTracks.c
@@ -2659,55 +2659,57 @@
if (*pNewWinEnd > virtSeqBaseCount)
*pNewWinEnd = virtSeqBaseCount;
*pNewWinStart = *pNewWinEnd - newWinSize;
}
#define EXONTEXTLEN 4096
static void makeExonFrameText(int exonIntronNumber, int numExons, int startPhase, int endPhase, char *buf)
/* Write mouseover text that describes the exon's phase into buf[EXONTEXTLEN].
Note that start/end-phases are in the direction of transcription:
if transcript is on + strand, the start phase is the exonFrame value, and the end phase is the next exonFrame (3' on DNA) value
if transcript is on - strand, the start phase is the previous (=3' on DNA) exonFrame and the end phase is the exonFrame */
{
-static const char *phaseHelp = "Help
";
-
if (startPhase==-1) // UTRs don't have a frame at all
{
safef(buf, EXONTEXTLEN, "No Codon: Untranslated region
");
}
else
{
char *exonNote = "";
boolean isNotLastExon = (exonIntronNumberCodon phase: ";
+
if (isNotLastExon)
{
if (startPhase==endPhase)
exonNote = ": in-frame exon";
else
exonNote = ": out-of-frame exon";
- safef(buf, EXONTEXTLEN, "Codon phase: start %d, end %d%s
%s", startPhase, endPhase, exonNote, phaseHelp);
+ safef(buf, EXONTEXTLEN, "%s start %d, end %d%s
", phasePrefix, startPhase, endPhase, exonNote);
}
else
{
if (startPhase==0)
exonNote = ": in-frame exon";
else
exonNote = ": out-of-frame exon";
- safef(buf, EXONTEXTLEN, "Codon phase: start %d%s
%s", startPhase, exonNote, phaseHelp);
+ safef(buf, EXONTEXTLEN, "%s start %d%s
", phasePrefix, startPhase, exonNote);
}
}
}
boolean linkedFeaturesNextPrevItem(struct track *tg, struct hvGfx *hvg, void *item, int x, int y, int w, int h, boolean next)
/* Draw a mapBox over the arrow-button on an *item already in the window*. */
/* Clicking this will do one of several things: */
{
boolean result = FALSE;
struct linkedFeatures *lf = item;
struct simpleFeature *exons = lf->components;
struct simpleFeature *exon = exons;
char *nextExonText;
char *prevExonText;
long newWinSize = virtWinEnd - virtWinStart;