cc54e8ee46e408773d86ab0492d5aed3244baff6 hiram Wed Mar 25 14:59:21 2026 -0700 provide data access instruction for gcOnFly track data refs #35958 diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index 4fc8575e4a7..43897dac804 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -24232,30 +24232,51 @@ sprintLongWithCommas(num1Buf, BASE_1(winStart)); sprintLongWithCommas(num2Buf, winEnd); printf("Position: %s:%s-%s
\n", seqName, num1Buf, num2Buf); sprintLongWithCommas(num1Buf, winEnd - winStart); printf("Total bases in view: %s
\n", num1Buf); printf("Window size for GC calculation: %d bases
\n", span); /* Use whole view as one window to get overall GC percent */ struct gcOnTheFlyWindow *windows = NULL; int regionSize = winEnd - winStart; int windowCount = gcOnTheFlyCompute(database, seqName, winStart, winEnd, regionSize, &windows); if (windowCount > 0) printf("GC percent in view: %.3f%%
\n", windows[0].gcPct); freeMem(windows); + +printf("

Data Access

\n"); +printf("

This track is generated on-the-fly by the browser as needed.\n" + "There is no existing data file for this track. To obtain the data for this track\n" + "use the following kent command line program hgGcPercent:

\n"); + +/* Don't free asmName, it is not allocated */ +char *asmName = hubConnectSkipHubPrefix(database); +boolean genArk = isGenArk(asmName); +char twoBitUrl[PATH_LEN]; +if (genArk) + { + safef(twoBitUrl, sizeof(twoBitUrl), "https://%shubs/%s/%s.2bit", hDownloadsServer(), genArkPath(asmName), asmName); + } +else + { + safef(twoBitUrl, sizeof(twoBitUrl), "https://%s/goldenPath/%s/bigZips/%s.2bit", hDownloadsServer(), asmName, asmName); + } + +printf("hgGcPercent -wigOut -doGaps -file=stdout -win=5 -verbose=0 test \\
   %s | gzip -c > %s.varStep.gz
\n", twoBitUrl, asmName); webIncludeHelpFile(GC_ON_FLY_TRACK_NAME, TRUE); } struct slName *cutterIsoligamers(struct cutter *myEnzyme) /* Find enzymes with same cut site. */ { struct sqlConnection *conn; struct cutter *cutters = NULL; struct slName *ret = NULL; conn = hAllocConn("hgFixed"); char query[1024]; sqlSafef(query, sizeof query, "select * from cutters"); cutters = cutterLoadByQuery(conn, query); ret = findIsoligamers(myEnzyme, cutters);