0daab9c07e1fb7b75223d61b0faa52e34d94302e braney Fri May 8 10:31:34 2026 -0700 Block hgTables output for QuickLift tracks and hide QuickLift groups, refs #37519 QuickLift remaps tracks from another assembly on the fly for display, but the underlying bigBed data is in the source assembly's coordinates, so output queries against the destination assembly's region return no results (or, with a whole-genome query, dump source-assembly data with source coordinates). Detect quickLiftUrl on the selected track and errAbort from doTopSubmit and doSummaryStats with a clear message. Also filter groups whose label starts with "QuickLift" out of the Group dropdown in hgTables, and clear the cart's group var if it was pointing at a QuickLift group. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> diff --git src/hg/hgTables/hgTables.c src/hg/hgTables/hgTables.c index ef3a10d3249..2a63ad98887 100644 --- src/hg/hgTables/hgTables.c +++ src/hg/hgTables/hgTables.c @@ -337,30 +337,44 @@ /* Return TRUE if table (or a track with which it is associated) has 'tableBrowser noGenome' * and region is genome. */ { return (fullGenomeRegion() && cartTrackDbIsNoGenome(db, table)); } void checkNoGenomeDisabled(char *db, char *table) /* Before producing output, make sure that the URL hasn't been hacked to make a * genome-wide query on a noGenome table. */ { if (isNoGenomeDisabled(db, table)) errAbort("Can't do genome-wide query on %s. " "Please go back and choose a position range.", table); } +void checkNoQuickLift(struct trackDb *track) +/* Before producing output, make sure the track isn't being remapped via + * QuickLift -- the underlying data is in the source assembly's coordinates, + * so output queries against the destination assembly's region won't make + * sense. */ +{ +if (track != NULL && trackDbSetting(track, "quickLiftUrl") != NULL) + errAbort("Get output is not supported for QuickLift tracks. " + "QuickLift remaps tracks from another assembly on the fly for display, " + "but the underlying data is in the source assembly's coordinates. " + "Please go back to the genome browser and switch to the source assembly " + "to retrieve this track's data."); +} + static int regionCmp(const void *va, const void *vb) /* Compare to sort based on chrom,start */ { const struct region *a = *((struct region **)va); const struct region *b = *((struct region **)vb); int dif; dif = chrStrippedCmp(a->chrom, b->chrom); if (dif == 0) dif = a->start - b->start; return dif; } static struct region *getRegionsFullGenomeLocal() /* get all the chrom ranges for a local database */ { @@ -1484,30 +1498,31 @@ if (!sameString(curGroup->name, "allTables")) { trackName = undupedTrackName(cart, hgtaTrack); track = mustFindTrack(trackName, fullTrackList); } else { struct trackDb *cTdb = NULL; track = hTrackDbForTrack(database, table); cTdb = hCompositeTrackDbForSubtrack(database, track); if (cTdb) track = cTdb; } checkNoGenomeDisabled(database, table); +checkNoQuickLift(track); if (track != NULL) { if (sameString(track->table, "gvPos") && !cartVarExists(cart, "gvDisclaimer")) { /* display disclaimer and add flag to cart, program exits from here */ htmlStart("Table Browser"); gvDisclaimer(); } else if (sameString(track->table, "gvPos") && sameString(cartString(cart, "gvDisclaimer"), "Disagree")) { cartRemove(cart, "gvDisclaimer"); cartRemove(cart, hgtaDoTopSubmit); cartSetString(cart, hgtaDoMainPage, "return to table browser");