a30c400ad09e9ae41fbbf7636deed814a86e1edd braney Thu Jul 28 17:34:22 2022 -0700 Build hub and genome stanzas for curated hubs from dbDb. Don't show curated assemblies as hubs on hgGateway or hgHubConnect. diff --git src/hg/hgGateway/hgGateway.c src/hg/hgGateway/hgGateway.c index cde81f3..d7371eb 100644 --- src/hg/hgGateway/hgGateway.c +++ src/hg/hgGateway/hgGateway.c @@ -125,46 +125,46 @@ char *position) /* Write JSON for the info needed to populate the 'Find Position' section. */ { char *genome = hGenome(db); if (isEmpty(genome)) { jsonWriteStringf(jw, "error", "No genome for db '%s'", db); } else { jsonWriteString(jw, "db", db); jsonWriteNumber(jw, "taxId", taxId); jsonWriteString(jw, "genome", genome); struct slPair *dbOptions = NULL; char genomeLabel[PATH_LEN*4]; - if (isNotEmpty(hubUrl)) + if (isNotEmpty(hubUrl) && !startsWith("/gbdb", hubUrl)) { struct trackHub *hub = hubConnectGetHub(hubUrl); if (hub == NULL) { jsonWriteStringf(jw, "error", "Can't connect to hub at '%s'", hubUrl); return; } struct dbDb *dbDbList = trackHubGetDbDbs(hub->name); dbOptions = trackHubDbDbToValueLabel(dbDbList); safecpy(genomeLabel, sizeof(genomeLabel), hub->shortLabel); jsonWriteString(jw, "hubUrl", hubUrl); } else { - dbOptions = hGetDbOptionsForGenome(genome); + dbOptions = hGetDbOptionsForGenome(trackHubSkipHubName(genome)); safecpy(genomeLabel, sizeof(genomeLabel), genome); } jsonWriteValueLabelList(jw, "dbOptions", dbOptions); jsonWriteString(jw, "genomeLabel", genomeLabel); jsonWriteString(jw, "position", position); char *suggestTrack = NULL; if (! trackHubDatabase(db)) suggestTrack = assemblyGeneSuggestTrack(db); jsonWriteString(jw, "suggestTrack", suggestTrack); char *description = maybeGetDescriptionText(db); jsonWriteString(jw, "description", description); listAssemblyHubs(jw); } }