2654a3d85847492877e5d2b48d921a292e991771
braney
Thu May 7 09:40:26 2026 -0700
hgConvert quickLift: fix subtrack selection, hgc Predicted Protein /
CDS FASTA links
Three remaining issues on this ticket:
(vii) After "+ Select all subtracks" on hg38 refSeqComposite then
quickLifting to hs1, only RefSeq Curated rendered. dumpTdbAndChildren
built buffer="<track>_sel" but then read cart[tdb->track] (the visibility,
not the checkbox state); the visibility is never "1", so every subtrack
emitted "parent <comp> off" and only trackDb-default-on subtracks
rendered. Read cart[buffer] and accept any cartUsualBoolean-true value
("on" or positive int).
Predicted Protein blank page on quickLifted refGene:
getGenePredForPositionSql passed the hub-prefixed tdb->table to
quickLiftSql, which then queried the source DB (hg38) for a
"hub_NNN_refGene" table that doesn't exist. Strip the prefix with
trackHubSkipHubName before the source-DB query. Also, doRefGene was
overriding pepName to rl->mrnaAcc for every quickLifted item, so for
non-coding NR_* the mrnaAcc matched gbSeq and we offered a Predicted
Protein link that htcTranslatedPredMRna can only abort on. Only
override pepName for coding mRNAs; non-coding falls through to the
existing "Non-protein coding gene..." message.
CDS FASTA "Unknown database hub_NNN_<db>": addPalLink generates an hgPal
URL with no db=, so hgPal tries to open the destination hub-virtual db
and dies. palInfo coords are in destination space anyway while the
multiZ alignment lives in source coords, so skip addPalLink for
quickLifted tracks.
refs #36125
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c
index b747cfc69e0..5dfa88c8d31 100644
--- src/hg/lib/trackHub.c
+++ src/hg/lib/trackHub.c
@@ -1669,36 +1669,34 @@
char *cartVis = cartOptionalString(cart, tdb->track);
if (cartVis != NULL)
tdb->visibility = hTvFromString(cartVis);
dyStringPrintf(dy, "visibility %s\n", hStringFromTv(tdb->visibility));
if (tdbIsSuperTrack(tdb->parent))
dyStringPrintf(dy, "parent %s\n", trackHubSkipHubName(tdb->parent->track));
while ((hel = hashNext(&cookie)) != NULL)
{
if (sameString(hel->name, "parent"))
{
char buffer[1024];
safef(buffer, sizeof buffer, "%s_sel", tdb->track);
- char *cartSelected = cartOptionalString(cart, tdb->track);
+ char *cartSelected = cartOptionalString(cart, buffer);
if (cartSelected != NULL)
{
- char *str = "off";
- if (sameString(cartSelected, "1"))
- str = "on";
+ char *str = (sameWord(cartSelected, "on") || atoi(cartSelected) > 0) ? "on" : "off";
dyStringPrintf(dy, "parent %s %s\n", trackHubSkipHubName(tdb->parent->track), str);
}
else
dyStringPrintf(dy, "%s %s\n", hel->name, trackHubSkipHubName(((char *)hel->val)));
}
else if (sameString(hel->name, "html"))
dyStringPrintf(dy, "%s %s\n", hel->name, trackHubSkipHubName((char *)hel->val));
else if (differentString(hel->name, "track") && differentString(hel->name, "visibility"))
dyStringPrintf(dy, "%s %s\n", hel->name, ((char *)hel->val));
}
if (tdb->subtracks)
{
for (tdb = tdb->subtracks; tdb; tdb = tdb->next)
{