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("<B>Position:</B> %s:%s-%s<BR>\n", seqName, num1Buf, num2Buf);
 sprintLongWithCommas(num1Buf, winEnd - winStart);
 printf("<B>Total bases in view:</B> %s<BR>\n", num1Buf);
 printf("<B>Window size for GC calculation:</B> %d bases<BR>\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("<B>GC percent in view:</B> %.3f%%<BR>\n", windows[0].gcPct);
 freeMem(windows);
+
+printf("<hr><h4>Data Access</h4>\n");
+printf("<p>This track is generated <em>on-the-fly</em> 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 <a href='https://hgdownload.gi.ucsc.edu/downloads.html#utilities_downloads'\n"
+ " target=_blank>kent command line</a> program <b>hgGcPercent</b>:</p>\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("<code>hgGcPercent -wigOut -doGaps -file=stdout -win=5 -verbose=0 test \\<br>&nbsp;&nbsp;&nbsp;%s | gzip -c > %s.varStep.gz</code>\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);