8449e4fa9d013670193f6af7f416204f75f04a1e braney Thu Sep 17 09:52:53 2026 -0700 bigNet: say so when the type line names a chain track this assembly lacks netChainTdb returns NULL when the chain track a bigNet's type line names is not in trackHash, and the guard on the alignment section then dropped the whole section without a word. A quickLifted net already explained itself in that spot; a hub with a typo in its type line got nothing, and there is no other signal that the name is wrong. The two cases now share one branch, since only a bigNet with no chain track to follow can reach it. The name comes from the type line as the hub spelled it, before the hub prefix is added, and goes out through htmlPrintf because it is a hub's text. Found in the v504 code review, refs #38349. refs #20824 diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index 462b880450f..c51d863f3e8 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -4482,30 +4482,31 @@ char *otherOrg = hOrganism(otherDb); char *otherOrgBrowser = otherOrg; int tSize, qSize; int netWinSize; struct chain *chain; boolean isBig = startsWith("big", tdb->type); /* A quickLifted net has moved to this assembly on its own. The chain track its type * line names is still on the source assembly, so there is no alignment to show and no * chain to follow -- only the net itself lifted. */ boolean isLifted = isBig && (trackDbSetting(tdb, "quickLiftUrl") != NULL); struct trackDb *chainTdb = NULL; /* Set when a lifted row would only lift with its ends pulled in to the chains we * loaded, so the numbers below describe the visible part and not the whole item. */ boolean clipped = FALSE; +char *namedChainTrack = chainTrack; /* as the type line spells it, for the message below */ if (isBig && !isLifted) { chainTrack = netChainTrackName(tdb, chainTrack); chainTdb = netChainTdb(chainTrack); } if (otherOrg == NULL) { /* use first word in short track label */ otherOrg = firstWordInLine(cloneString(tdb->shortLabel)); } if (isBig) { net = bigNetLoadOne(tdb, seqName, start, sqlUnsigned(item), &clipped); if (net == NULL) @@ -4567,36 +4568,48 @@ char idBuf[32]; safef(idBuf, sizeof idBuf, "%u", net->chainId); chain = chainLoadItemInRange(chainTdb, idBuf); } else chain = chainDbLoad(conn, database, chainTrack, seqName, net->chainId); if (chain != NULL) { /* print link to browser for otherDb only if otherDb is active */ if (hDbIsActive(otherDb)) chainToOtherBrowser(chain, otherDb, otherOrgBrowser, NULL); chainFree(&chain); } htmlHorizontalLine(); } -else if ((net->chainId != 0) && isLifted) +else if (net->chainId != 0) + { + /* Only an isBig track with no chain track to follow gets here. */ + if (isLifted) { char *sourceDb = trackDbSetting(tdb, "quickLiftDb"); printf("
This net was lifted from %s, so its chains are not on this assembly " "and the alignment cannot be shown here.
\n", isEmpty(sourceDb) ? "another assembly" : sourceDb); + } + else + { + /* A hub whose type line names a chain track this assembly does not have. Say so + * rather than dropping the whole section without a word. */ + htmlPrintf("
This track's type line names the chain track %s, which is not on " + "this assembly, so the alignment cannot be shown here.
\n", + emptyForNull(namedChainTrack)); + } htmlHorizontalLine(); } printf("Type: %s
\n", net->type); printf("Level: %d
\n", (net->level+1)/2); printf("%s position: %s:%d-%d
\n", org, net->tName, net->tStart+1, net->tEnd); printf("%s position: %s:%d-%d
\n", otherOrg, net->qName, net->qStart+1, net->qEnd); printf("Strand: %c
\n", net->strand[0]); printLabeledNumber(NULL, "Score", net->score); if (net->chainId) { printf("Chain ID: %u
\n", net->chainId); printLabeledNumber(NULL, "Bases aligning", net->ali); if (net->qOver >= 0)