5fa73cd9b411b3147227a4a31f6df7b24638dd00 max Fri Apr 24 05:37:11 2026 -0700 adding exon length to mouseover, refs #37439 diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index 15821d3d835..dd983c5b5d1 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -3073,57 +3073,57 @@ int w = codonex - codonsx; if (w > 0) { // temporarily remove the mouseOver from the lf, since linkedFeatureMapItem will always // prefer a lf->mouseOver over the itemName char *oldMouseOver = lf->mouseOver; lf->mouseOver = NULL; dyStringClear(codonDy); // if you change this text, make sure you also change hgTracks.js:mouseOverToLabel if (!isEmpty(existingText)) dyStringPrintf(codonDy, "Transcript: %s
", existingText); int codonHgvsIx = (codon->codonIndex - 1) * 3; if (codonHgvsIx >= 0) dyStringPrintf(codonDy, "Codons: c.%d-%d
", codonHgvsIx + 1, codonHgvsIx + 3); // if you change the text below, also change hgTracks:mouseOverToExon - dyStringPrintf(codonDy, "Strand: %c
Exon: %s %d of %d
%s", - strandChar, exonIntronText, exonIntronNumber, numExonIntrons, phaseText); + dyStringPrintf(codonDy, "Strand: %c    Length: %dbp
Exon: %s %d of %d
%s", + strandChar, e - s, exonIntronText, exonIntronNumber, numExonIntrons, phaseText); tg->mapItem(tg, hvg, item, codonDy->string, tg->mapItemName(tg, item), sItem, eItem, codonsx, y, w, heightPer); // and restore the mouseOver lf->mouseOver = oldMouseOver; } } } } } else // either an intron, or else an exon zoomed out too far for codons (or no codons) { // if you change this text, make sure you also change hgTracks.js:mouseOverToLabel // if you change the text below, also change hgTracks:mouseOverToExon char *posNote = ""; char *exonOrIntron = "Intron"; if (isExon) { posNote = "Codons: Zoom in to show cDNA position
"; exonOrIntron = "Exon"; } safef(mouseOverText, sizeof(mouseOverText), "Transcript: %s
%s" - "Strand: %c
%s: %s %d of %d
%s", - existingText, posNote, strandChar, exonOrIntron, exonIntronText, + "Strand: %c    Length: %dbp
%s: %s %d of %d
%s", + existingText, posNote, strandChar, e - s, exonOrIntron, exonIntronText, exonIntronNumber, numExonIntrons, phaseText); // temporarily remove the mouseOver from the lf, since linkedFeatureMapItem will always // prefer a lf->mouseOver over the itemName char *oldMouseOver = lf->mouseOver; lf->mouseOver = NULL; tg->mapItem(tg, hvg, item, mouseOverText, tg->mapItemName(tg, item), sItem, eItem, sx, y, w, heightPer); // and restore the old mouseOver lf->mouseOver = oldMouseOver; picStart = ex; // prevent pileups. is this right? add 1? does it work? // JC: Why do we care about pileups? First mapbox drawn wins. } }