489d28b9339f6b3cfa867d19a2855f2808205795 angie Fri Apr 5 09:52:55 2019 -0700 vcfUi did not support track hubs -- it assumed it would be able to make a sql conn. Look for bigDataUrl first. refs #23252 diff --git src/hg/lib/vcfUi.c src/hg/lib/vcfUi.c index fb656be..2171683 100644 --- src/hg/lib/vcfUi.c +++ src/hg/lib/vcfUi.c @@ -116,48 +116,51 @@ dyStringPrintf(onClick, "document.%s.submit(); return false;", formName); cgiMakeButtonWithOnClick("clearCenterSubmit", "Clear selection", NULL, onClick->string); printf(" (use " VCF_HAPLOSORT_DEFAULT_DESC ")\n"); } puts(""); } } //TODO: share this code w/hgTracks, hgc in hg/lib/vcfFile.c static struct vcfFile *vcfHopefullyOpenHeader(struct cart *cart, struct trackDb *tdb) /* Defend against network errors and return the vcfFile object with header data, or NULL. */ { knetUdcInstall(); if (udcCacheTimeout() < 300) udcSetCacheTimeout(300); +char *fileOrUrl = trackDbSetting(tdb, "bigDataUrl"); +if (isEmpty(fileOrUrl)) + { char *db = cartString(cart, "db"); char *table = tdb->table; char *dbTableName = trackDbSetting(tdb, "dbTableName"); struct sqlConnection *conn; if (isCustomTrack(tdb->track) && isNotEmpty(dbTableName)) { conn = hAllocConn(CUSTOM_TRASH); table = dbTableName; } else conn = hAllocConnTrack(db, tdb); -char *fileOrUrl = NULL; char *chrom = cartOptionalString(cart, "c"); if (chrom != NULL) fileOrUrl = bbiNameFromSettingOrTableChrom(tdb, conn, table, chrom); if (fileOrUrl == NULL) fileOrUrl = bbiNameFromSettingOrTableChrom(tdb, conn, table, hDefaultChrom(db)); hFreeConn(&conn); + } if (fileOrUrl == NULL) return NULL; int vcfMaxErr = 100; struct vcfFile *vcff = NULL; /* protect against temporary network error */ struct errCatch *errCatch = errCatchNew(); if (errCatchStart(errCatch)) { if (startsWithWord("vcfTabix", tdb->type)) vcff = vcfTabixFileMayOpen(fileOrUrl, NULL, 0, 0, vcfMaxErr, -1); else vcff = vcfFileMayOpen(fileOrUrl, NULL, 0, 0, vcfMaxErr, -1, FALSE); } errCatchEnd(errCatch); if (errCatch->gotError)