11049a7e4e1de1b3218ec8184cdf5e9df8658681 braney Mon Jul 20 10:05:02 2026 -0700 quickLift: highlight the clicked difference on the hgc details page hgTracks/quickLift.c now encodes the specific difference in each mapbox item name as chainId.type.chromStart.chromEnd (the "identical" region boxes keep the bare chain id). hgc.c parses that item name back into a chain id plus the clicked region, bolds the matching row in the Deletions/Insertions/Doubles/ Mismatches tables, and prints a note telling the user which row they clicked. Also adds bigQuickLiftChain to the set of types that suppress the details-page header item. diff --git src/hg/hgTracks/quickLift.c src/hg/hgTracks/quickLift.c index cff266216c5..820303bf77a 100644 --- src/hg/hgTracks/quickLift.c +++ src/hg/hgTracks/quickLift.c @@ -157,31 +157,36 @@ startX = x1; endX = x1 + w; hvGfxBox(hvg, startX, yOff, w, height, hexColor); continue; } if (hr->type == QUICKTYPE_MISMATCH) safef(mouseOver, sizeof mouseOver, "mismatch %c->%c", *hr->otherBases, *hr->bases); else if (hr->chromStart == hr->chromEnd) safef(mouseOver, sizeof mouseOver, "deletion %ldbp (%.*s)", hr->oChromEnd - hr->oChromStart, hr->otherBaseCount, hr->otherBases); else if (hr->oChromStart == hr->oChromEnd) safef(mouseOver, sizeof mouseOver, "insertion %ldbp (%.*s)", hr->chromEnd - hr->chromStart, hr->baseCount, hr->bases); else safef(mouseOver, sizeof mouseOver, "double %ldbp", hr->oChromEnd - hr->oChromStart); - mapBoxHc(hvg, seqStart, seqEnd, startX, yOff, endX - startX, height, tg->track, hr->id, mouseOver); + // Encode the specific difference in the item name so the details page can + // identify which one was clicked: chainId.type.chromStart.chromEnd. The + // "identical" boxes above keep the bare chain id. + char itemName[256]; + safef(itemName, sizeof itemName, "%s.%d.%ld.%ld", hr->id, hr->type, hr->chromStart, hr->chromEnd); + mapBoxHc(hvg, seqStart, seqEnd, startX, yOff, endX - startX, height, tg->track, itemName, mouseOver); lastId = hr->id; } if (drawTriangle && (pos != xOff)) mapBoxHc(hvg, seqStart, seqEnd, pos, yOff, width - pos, tg->height, tg->track, lastId, "identical"); } void quickLiftDraw(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font, Color color, enum trackVisibility vis) { //mapBoxHc(hvg, seqStart, seqEnd, xOff, yOff, width, tg->height, tg->track, "fart", "hallo"); maybeDrawQuickLiftLines( tg, seqStart, seqEnd, hvg, xOff, yOff, width, font, color, vis); }