092f837bff8a9b5951f18447d8a4314169d15e46 hiram Thu May 11 14:42:22 2023 -0700 use hDownloadsServer() to get the correct download URL refs #31257 diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c index c6dc18e..5fc98df 100644 --- src/hg/lib/trackHub.c +++ src/hg/lib/trackHub.c @@ -406,62 +406,65 @@ if (absFileName) { hashReplace(genome->settingsHash, tagName, absFileName); fileName = absFileName; } return fileName; } char *trackHubChromSizes(char *database) /* see if this assembly hub has a chrom.sizes file, return url if present * returns NULL when not present */ { if (hubConnectIsCurated(trackHubSkipHubName(database))) { + /* using the function: hDownloadsServer() to get this URL + * from hg.conf only helps for hgdownload-test vs. hgdownload.soe + */ char urlPath[PATH_LEN]; - safef(urlPath, sizeof(urlPath), "https://hgdownload.soe.ucsc.edu/goldenPath/%s/bigZips/%s.chrom.sizes.txt", trackHubSkipHubName(database), trackHubSkipHubName(database)); + safef(urlPath, sizeof(urlPath), "https://%s/goldenPath/%s/bigZips/%s.chrom.sizes.txt", hDownloadsServer(), trackHubSkipHubName(database), trackHubSkipHubName(database)); return cloneString(urlPath); } else return assemblyHubGenomeSetting(database, "chromSizes"); } char *trackHubAliasBbFile(char *database) /* see if this assembly hub has an alias bigBed file, return url if present * returns NULL when not present */ { if (hubConnectIsCurated(trackHubSkipHubName(database))) { char urlPath[PATH_LEN]; - safef(urlPath, sizeof(urlPath), "https://hgdownload.soe.ucsc.edu/goldenPath/%s/bigZips/%s.chromAlias.bb", trackHubSkipHubName(database), trackHubSkipHubName(database)); + safef(urlPath, sizeof(urlPath), "https://%s/goldenPath/%s/bigZips/%s.chromAlias.bb", hDownloadsServer(), trackHubSkipHubName(database), trackHubSkipHubName(database)); return cloneString(urlPath); } else return assemblyHubGenomeSetting(database, "chromAliasBb"); } char *trackHubAliasFile(char *database) /* see if this assembly hub has an alias file, return url if present * returns NULL when not present */ { if (hubConnectIsCurated(trackHubSkipHubName(database))) { char urlPath[PATH_LEN]; - safef(urlPath, sizeof(urlPath), "https://hgdownload.soe.ucsc.edu/goldenPath/%s/bigZips/%s.chromAlias.txt", trackHubSkipHubName(database), trackHubSkipHubName(database)); + safef(urlPath, sizeof(urlPath), "https://%s/goldenPath/%s/bigZips/%s.chromAlias.txt", hDownloadsServer(), trackHubSkipHubName(database), trackHubSkipHubName(database)); return cloneString(urlPath); } else return assemblyHubGenomeSetting(database, "chromAlias"); } struct chromInfo *trackHubAllChromInfo(char *database) /* Return a chromInfo structure for all the chroms in this database. */ { struct trackHubGenome *genome = trackHubGetGenome(database); if (genome == NULL) return NULL; if (genome->tbf == NULL) genome->tbf = openTwoBit(genome);