3846f517009c43abc65d227a4695645c9b5f3e8a braney Fri Feb 15 18:31:21 2013 -0800 changes necessary to support assembly hubs (#8072) diff --git src/hg/lib/hgFind.c src/hg/lib/hgFind.c index 2e8b52e..257f5aa 100644 --- src/hg/lib/hgFind.c +++ src/hg/lib/hgFind.c @@ -19,30 +19,32 @@ #include "cytoBand.h" #include "cart.h" #include "hgFind.h" #include "hgFindSpec.h" #include "snp.h" #include "refLink.h" #include "kgAlias.h" #include "kgProtAlias.h" #include "findKGAlias.h" #include "findKGProtAlias.h" #include "tigrCmrGene.h" #include "minGeneInfo.h" #include "pipeline.h" #include "hgConfig.h" #include "trix.h" +#include "trackHub.h" +#include "udc.h" extern struct cart *cart; char *hgAppName = ""; /* alignment tables to check when looking for mrna alignments */ static char *estTables[] = { "intronEst", "all_est", "xenoEst", NULL }; static char *estLabels[] = { "Spliced ESTs", "ESTs", "Other ESTs", NULL }; static char *mrnaTables[] = { "all_mrna", "xenoMrna", NULL }; static char *mrnaLabels[] = { "mRNAs", "Other mRNAs", NULL }; static struct dyString *hgpMatchNames = NULL; static void hgPosFree(struct hgPos **pEl) /* Free up hgPos. */ { @@ -3160,36 +3162,46 @@ void hgPositionsHelpHtml(char *organism, char *database) /* Display contents of dbDb.htmlPath for database, or print an HTML comment * explaining what's missing. */ { char *htmlPath = hHtmlPath(database); char *htmlString = NULL; size_t htmlStrLength = 0; if (strstrNoCase(organism, "zoo")) webNewSection("About the NISC Comparative Sequencing Program Browser"); else webNewSection("%s Genome Browser – %s assembly" " (sequences)", - organism, database, + trackHubRemoveHubName(organism), + trackHubRemoveHubName(database), hgTracksName(), cartSessionVarName(), cartSessionId(cart)); if (htmlPath != NULL && fileExists(htmlPath)) readInGulp(htmlPath, &htmlString, &htmlStrLength); +else if ( startsWith("http://" , htmlPath) || + startsWith("https://", htmlPath) || + startsWith("ftp://" , htmlPath)) + { + struct lineFile *lf = udcWrapShortLineFile(htmlPath, NULL, 256*1024); + htmlString = lineFileReadAll(lf); + htmlStrLength = strlen(htmlString); + lineFileClose(&lf); + } if (htmlStrLength > 0) { puts(htmlString); freeMem(htmlString); freeMem(htmlPath); } else { - printf("