8a0946dd6870f10cde056ba243f1fb4ec1fd16b4
angie
Thu Feb 27 11:58:33 2014 -0800
Adding support for plain VCF custom tracks (as opposed to VCF+tabix),since users seem to want to upload VCF, and as long as the file is
not too big it will work OK. This means adding a new track type
vcf (as opposed to vcfTabix) and supporting it in hgTracks, hgTrackUi,
hgc, hgTables and hgVai. (and others I've forgotten?)
refs #12416
diff --git src/hg/hgTables/schema.c src/hg/hgTables/schema.c
index 092d751..1995525 100644
--- src/hg/hgTables/schema.c
+++ src/hg/hgTables/schema.c
@@ -610,58 +610,59 @@
else
errAbort("Unrecognized customTrack type %s", type);
}
static void showSchemaHub(char *db, char *table)
/* Show schema on a hub track. */
{
struct trackDb *tdb = hashMustFindVal(fullTableToTdbHash, table);
hubConnectAddDescription(db, tdb);
char *type = cloneFirstWord(tdb->type);
if (sameString(type, "bigBed"))
showSchemaBigBed(table, tdb);
else if (sameString(type, "bam"))
showSchemaBam(table, tdb);
else if (sameString(type, "vcfTabix"))
- showSchemaVcf(table, tdb);
+ showSchemaVcf(table, tdb, TRUE);
else
{
hPrintf("Binary file of type %s stored at %s
\n",
type, trackDbSetting(tdb, "bigDataUrl"));
printTrackHtml(tdb);
}
}
static void showSchemaWiki(struct trackDb *tdb, char *table)
/* Show schema for the wikiTrack. */
{
hPrintf("User annotations to UCSC genes or genome regions
\n");
showSchemaDb(wikiDbName(), tdb, table);
printTrackHtml(tdb);
}
static void showSchema(char *db, struct trackDb *tdb, char *table)
/* Show schema to open html page. */
{
+boolean isTabix = FALSE;
if (isHubTrack(table))
showSchemaHub(db, table);
else if (isBigBed(database, table, curTrack, ctLookupName))
showSchemaBigBed(table, tdb);
else if (isBamTable(table))
showSchemaBam(table, tdb);
-else if (isVcfTable(table))
- showSchemaVcf(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
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);