e4d33ed2bb42c55bb1feb138ae6c7f14f8a3551e
braney
Wed Aug 29 13:22:33 2018 -0700
fix native bigChain support refs #16402
diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 4b93848..1307b9e 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -3211,31 +3211,31 @@
int chainWinSize;
double subSetScore = 0.0;
int qs, qe;
boolean nullSubset = FALSE;
if (! sameWord(otherDb, "seq"))
{
otherOrg = hOrganism(otherDb);
}
if (otherOrg == NULL)
{
/* use first word of chain label (count on org name as first word) */
otherOrg = firstWordInLine(cloneString(tdb->shortLabel));
}
-if (isHubTrack(tdb->track) || isCustomTrack(tdb->track))
+if (startsWith("big", tdb->type))
{
char *fileName = bbiNameFromSettingOrTable(tdb, conn, tdb->table);
char *linkFileName = trackDbSetting(tdb, "linkDataUrl");
chain = chainLoadIdRangeHub(fileName, linkFileName, seqName, winStart, winEnd, atoi(item));
}
else
{
chain = chainLoadIdRange(database, tdb->table, seqName, winStart, winEnd, atoi(item));
}
chainSubsetOnT(chain, winStart, winEnd, &subChain, &toFree);
if (subChain == NULL)
nullSubset = TRUE;
else if (hDbIsActive(otherDb) && subChain != chain)
@@ -3331,31 +3331,31 @@
if ((row = sqlNextRow(sr)) != NULL)
printf("Normalized Score: %1.0f (bases matched: %d)
\n",
atof(row[0]), (int) (chain->score/atof(row[0])));
sqlFreeResult(&sr);
}
printf("
\n");
chainWinSize = min(winEnd-winStart, chain->tEnd - chain->tStart);
/* Show alignment if the database exists and */
/* if there is a chromInfo table for that database and the sequence */
/* file exists. This means that alignments can be shown on the archive */
/* server (or in other cases) if there is a database with a chromInfo table, */
/* the sequences are available and there is an entry added to dbDb for */
/* the otherDb. */
-if (sqlDatabaseExists(otherDb) && chromSeqFileExists(otherDb, chain->qName))
+if (!startsWith("big", tdb->type) && sqlDatabaseExists(otherDb) && chromSeqFileExists(otherDb, chain->qName))
{
if (chainWinSize < 1000000)
{
hgcAnchorSomewhere("htcChainAli", item, tdb->track, chain->tName);
printf("View details of parts of chain within browser "
"window.
\n");
}
else
{
printf("Zoom so that browser window covers 1,000,000 bases or less "
"and return here to see alignment details.
\n");
}
if (!sameWord(otherDb, "seq") && (hDbIsActive(otherDb)))
{
chainToOtherBrowser(chain, otherDb, otherOrg);