904c1c8e951519488cf06099bfab3feb81abb3db
ceisenhart
Wed Jul 5 14:45:07 2017 -0700
Fixing the table browser bug with bigWig files without tables, refs #19701
diff --git src/hg/hgTables/schema.c src/hg/hgTables/schema.c
index 25e013e..659a209 100644
--- src/hg/hgTables/schema.c
+++ src/hg/hgTables/schema.c
@@ -382,31 +382,31 @@
hPrintf(" (%s)", splitTable);
hPrintf(" Row Count: ");
printLongWithCommas(stdout, sqlTableSize(conn, splitTable));
char *date = firstWordInLine(sqlTableUpdate(conn, splitTable));
if (date != NULL)
printf("   Data last updated: %s
\n", date);
if (asObj != NULL)
hPrintf("Format description: %s
", asObj->comment);
if (cartTrackDbIsNoGenome(db, table))
hPrintf(" Note: genome-wide queries are not available for this table.");
describeFields(db, splitTable, asObj, conn);
if (tdbForConn != NULL)
{
char *type = tdbForConn->type;
if (startsWithWord("bigWig", type))
- printf("
This table simply points to a file in "
+ printf("
This table points to a file in "
""
"BigWig format.
\n");
}
jpList = joinerRelate(joiner, db, table);
/* sort and unique list */
slUniqify(&jpList, joinerPairCmpOnAandB, joinerPairFree);
if (jpList != NULL)
{
webNewSection("Connected Tables and Joining Fields");
for (jp = jpList; jp != NULL; jp = jp->next)
{
if (cartTrackDbIsAccessDenied(jp->b->database, jp->b->table))
continue;
@@ -662,30 +662,32 @@
boolean isTabix = FALSE;
if (isHubTrack(table))
showSchemaHub(db, table);
else if (isBigBed(database, table, curTrack, ctLookupName))
showSchemaBigBed(table, tdb);
else if (isLongTabixTable(table))
showSchemaLongTabix(table, tdb);
else if (isBamTable(table))
showSchemaBam(table, tdb);
else if (isVcfTable(table, &isTabix))
showSchemaVcf(table, tdb, isTabix);
else if (isCustomTrack(table))
showSchemaCt(db, table);
else if (sameWord(table, WIKI_TRACK_TABLE))
showSchemaWiki(tdb, table);
+else if (startsWithWord("bigWig", tdb->type) && !hTableExists(db, table))
+ showSchemaBigWigNoTable(db, table, tdb);
else
showSchemaDb(db, tdb, table);
}
void doTableSchema(char *db, char *table, struct sqlConnection *conn)
/* Show schema around table (which is not described by curTrack). */
{
struct trackDb *tdb = NULL;
char parseBuf[256];
dbOverrideFromTable(parseBuf, &db, &table);
htmlOpen("Schema for %s", table);
tdb = hTrackDbForTrack(database, table);
showSchema(db, tdb, table);
htmlClose();
}