9acfd5f32458e2f9853a48ab631c122523e66bc8 braney Thu Sep 17 09:52:46 2026 -0700 hgc: gate the alignment details page on both halves of the quickLift pair quickLiftAliInfo returned early only when quickLiftDb was absent, so a stanza carrying quickLiftDb and no quickLiftUrl still took the lift path. That left quickLiftFile NULL, and the native branch of htcCdnaAli and htcCdnaAliInWindow then resolved the table name against the assembly on screen while running the query on the source assembly. Nothing unsafe happens, but the reader gets a missing table error rather than an alignment. Verified against a track with quickLiftDb hg19 and no quickLiftUrl, on a table hg38 has and hg19 does not: before, the page ended in "Table 'hg19.altSeqLiftOverPslP11' doesn't exist"; after, the base alignment renders. quickLiftIsLifted is the predicate the rest of the tree already uses for this, which cec5ead0547 said was true everywhere and was not true here. Found in the v504 code review, refs #38349. refs #38249 diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index 1f9cd1bcf67..462b880450f 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -8838,36 +8838,38 @@ // trackDb; aliTable can be a table name that both assemblies have. char *aliTrack = cartUsualString(cart, "aliTrack", NULL); if (isNotEmpty(aliTrack)) ali->tdb = hashFindVal(trackHash, aliTrack); if ((ali->tdb == NULL) && isCustomTrack(bareTable)) { struct customTrack *ct = lookupCt(bareTable); if (ct != NULL) ali->tdb = ct->tdb; } if (ali->tdb == NULL) ali->tdb = hashFindVal(trackHash, aliTable); if (ali->tdb == NULL) return; -char *liftDb = trackDbSetting(ali->tdb, "quickLiftDb"); -if (liftDb == NULL) +// Both halves of the pair or neither. Nothing filters a hub's trackDb, so a stanza can +// carry quickLiftDb on its own, and taking the assembly without the chain file would leave +// the table resolved against one assembly and the query run on the other. +if (!quickLiftIsLifted(ali->tdb)) return; ali->quickLiftFile = trackDbSetting(ali->tdb, "quickLiftUrl"); -ali->db = liftDb; +ali->db = trackDbSetting(ali->tdb, "quickLiftDb"); quickLiftResolveTable(ali->tdb, bareTable, &ali->table, &ali->db); } static struct psl *quickLiftFindPsl(struct quickLiftAli *ali, struct sqlConnection *conn, char *acc, char *chrom, int tStart) /* The alignment of acc that the lift places at chrom:tStart on the reference. Only that * destination position is known here and the lift does not run backwards, so read every * alignment of acc out of the other assembly, lift them, and keep the one that lands * where we were sent. Returns NULL if none does. */ { char splitTable[HDB_MAX_TABLE_STRING]; boolean hasBin; if (!hFindSplitTable(ali->db, chrom, ali->table, splitTable, sizeof splitTable, &hasBin)) errAbort("Failed to find aliTable=%s in %s", ali->table, ali->db);