0ef19267989fe032759da765ca5475bebf2803bd braney Thu Sep 24 17:13:21 2026 -0700 hgTracks: no codon translation on a quickLifted maf track at base level, refs #38249 The base-level view opened its connections for codon translation on the reference assembly and read the frames table there. For a lifted track both belong to the other assembly. When the reference is a hub assembly such as hs1 there is no database of that name, and the page aborted. A lifted maf now shows bases without codon translation. diff --git src/hg/hgTracks/wigMafTrack.c src/hg/hgTracks/wigMafTrack.c index bbad7678310..c39ec052a43 100644 --- src/hg/hgTracks/wigMafTrack.c +++ src/hg/hgTracks/wigMafTrack.c @@ -2066,42 +2066,45 @@ /* doubled to allow space for insert counts */ boolean complementBases = cartUsualBooleanDb(cart, database, COMPLEMENT_BASES_VAR, FALSE); bool dots = FALSE; /* configuration option */ /* this line must be longer than the longest base-level display */ char noAlignment[2000]; boolean useIrowChains = TRUE; int offset; char *framesTable = NULL; char *defaultCodonSpecies = cartUsualString(cart, SPECIES_CODON_DEFAULT, NULL); char *codonTransMode = NULL; boolean startSub2 = FALSE; int mafOrigOffset = 0; struct mafPriv *mp = getMafPriv(track); char *mafFile = NULL; +// A quickLifted track's tables and frames belong to the assembly it came from, and there +// is no database of that name here at all when the reference is a hub assembly. +boolean lifted = quickLiftIsLifted(track->tdb); struct sqlConnection *conn2 = NULL; struct sqlConnection *conn3 = NULL; char *tableName = NULL; if (mp->ct != NULL) { conn2 = hAllocConn(CUSTOM_TRASH); conn3 = hAllocConn(CUSTOM_TRASH); tableName = mp->ct->dbTableName; mafFile = getCustomMafFile(track); } -else if (!track->isBigBed) +else if (!track->isBigBed && !lifted) { conn2 = hAllocConn(database); conn3 = hAllocConn(database); tableName = track->table; mafFile = getTrackMafFile(track); // optional } if (defaultCodonSpecies == NULL) defaultCodonSpecies = trackDbSetting(track->tdb, "speciesCodonDefault"); if (defaultCodonSpecies == NULL) defaultCodonSpecies = database; if (seqStart > 2) { @@ -2116,30 +2119,35 @@ dots = cartUsualBooleanClosestToHome(cart, track->tdb, FALSE, MAF_DOT_VAR,TRUE); else { char *dotString = trackDbSetting(track->tdb, MAF_DOT_VAR); if (dotString && sameString(dotString, "on")) { dots = TRUE; } } if (cartVarExistsAnyLevel(cart, track->tdb,FALSE,"frames")) framesTable = cartOptionalStringClosestToHome(cart, track->tdb,FALSE,"frames"); else framesTable = trackDbSetting(track->tdb, "frames"); +// The frames are in the other assembly's coordinates and are not lifted, so a lifted +// track shows bases without codon translation. +if (lifted) + framesTable = NULL; + if (framesTable) { codonTransMode = cartUsualStringClosestToHome(cart, track->tdb,FALSE,"codons", "codonDefault"); if (sameString("codonNone", codonTransMode)) framesTable = NULL; } boolean newTableType = FALSE; if (framesTable != NULL) { if (track->isBigBed) newTableType = TRUE; else newTableType = hHasField(database, framesTable, "isExonStart");