f318a5ef17926efafcf8898bcfa5ec6bd8a57bf1 angie Mon Jan 13 13:37:17 2025 -0800 Add a Download section when a download.html file is present in the org directory. diff --git src/hg/hgPhyloPlace/hgPhyloPlace.c src/hg/hgPhyloPlace/hgPhyloPlace.c index 242ea18..d92c273 100644 --- src/hg/hgPhyloPlace/hgPhyloPlace.c +++ src/hg/hgPhyloPlace/hgPhyloPlace.c @@ -360,30 +360,53 @@ puts("</p>"); if (sameString(org, "wuhCor1")) { puts("<p>\n" "GISAID data displayed in the Genome Browser are subject to GISAID's\n" "<a href='https://www.gisaid.org/registration/terms-of-use/' target=_blank>" "Terms and Conditions</a>.\n" "SARS-CoV-2 genome sequences and metadata are available for download from\n" "<a href='https://gisaid.org' target=_blank>GISAID</a> EpiCoV™.\n" "</p>"); puts("<p>\n" "<a href='/covid19.html'>COVID-19 Pandemic Resources at UCSC</a></p>\n"); } puts("</div>"); puts("</div>"); +// If org directory includes non-empty download.html file then make a Download section +char *orgSkipHub = trackHubSkipHubName(org); +char downloadHtmlFile[1024]; +safef(downloadHtmlFile, sizeof downloadHtmlFile, PHYLOPLACE_DATA_DIR "/%s/download.html", orgSkipHub); +struct lineFile *lf = lineFileMayOpen(downloadHtmlFile, TRUE); +if (lf != NULL) + { + char *line = NULL; + int size; + lineFileNext(lf, &line, &size); + if (isNotEmpty(line)) + { + puts("<div class='readableWidth'>"); + puts(" <div class='gbControl col-md-12'>"); + puts("<h2>Download public tree files</h2>"); + puts(line); + while (lineFileNext(lf, &line, &size)) + puts(line); + puts(" </div>"); + puts("</div>"); + } + lineFileClose(&lf); + } puts("<div class='readableWidth'>"); puts(" <div class='gbControl col-md-12'>"); puts("<h2>Privacy and sharing</h2>"); puts("<h3>Please do not upload " "<a href='https://en.wikipedia.org/wiki/Protected_health_information#United_States' " "target=_blank>Protected Health Information (PHI)</a>.</h3>\n" "If even virus sequence files must remain local on your computer, then you can try " "<a href='https://shusher.gi.ucsc.edu/' target=_blank>ShUShER</a> " "which runs entirely in your web browser so that no files leave your computer." "</p>\n" "<p>We do not store your information " "(aside from the information necessary to display results)\n" "and will not share it with others unless you choose to share your Genome Browser view.</p>\n" "<p>In order to enable rapid progress in pandemic research and genomic contact tracing,\n" "please share your sequences by submitting them to an "