f12abfa6cad0164a03d39d3968986874a8c9a6b8
hiram
  Wed Mar 25 16:58:16 2026 -0700
same change to track Ui to indicate how to get the data for the gcOnFly synthetic track refs #35958

diff --git src/hg/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c
index aac0af2cdb3..cb5812c91c2 100644
--- src/hg/hgTrackUi/hgTrackUi.c
+++ src/hg/hgTrackUi/hgTrackUi.c
@@ -41,30 +41,31 @@
 #include "trackHub.h"
 #include "pcrResult.h"
 #include "dgv.h"
 #include "transMapStuff.h" 
 #include "vcfUi.h" 
 #include "bbiFile.h"
 #include "ensFace.h"
 #include "microarray.h"
 #include "trackVersion.h"
 #include "gtexUi.h"
 #include "genbank.h"
 #include "botDelay.h"
 #include "customComposite.h"
 #include "hicUi.h"
 #include "decoratorUi.h"
+#include "genark.h"
     
 #ifdef USE_HAL 
 #include "halBlockViz.h"
 #endif 
 
 #define MAIN_FORM "mainForm"
 #define WIGGLE_HELP_PAGE  "../goldenPath/help/hgWiggleTrackHelp.html"
 
 /* for earlyBotCheck() function at the beginning of main() */
 #define delayFraction   0.25    /* standard penalty is 1.0 for most CGIs */
                                 /* this one is 0.25 */
 static boolean issueBotWarning = FALSE;
 
 struct cart *cart = NULL;	/* Cookie cart with UI settings */
 char *database = NULL;		/* Current database. */
@@ -2289,30 +2290,50 @@
 char *winSize = cartUsualString(cart, gcOnFlyWindowSize, gcOnFlyDefaultSize);
 puts("<P><B>GC Percent calculation window size:&nbsp;</B>");
 jsInline(
 "function fullTrack()\n"
 "{\n"
 "var box = jQuery('select[name$=gcOnFly]');\n"
 "if (box.val()=='hide')\n"
 "    box.val('full');\n"
 "}\n");
 printf("<input name='%s' id='%s' size=\"%d\" value=\"%s\" type=\"TEXT\">",
     gcOnFlyWindowSize, gcOnFlySizeVar, 15, winSize);
 jsOnEventById("input", gcOnFlySizeVar, "fullTrack();");
 puts("<P>UCSC standard window size is 5 bases.  Adjust size as desired.</P>");
 /* Add standard wiggle graph controls (height, scale, graph type, smoothing, etc.) */
 wigCfgUi(cart, tdb, tdb->track, "Graph configuration:", FALSE);
+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);
 }
 
 void cutterUi(struct trackDb *tdb)
 /* UI for restriction enzyme track */
 {
 char *enz = cartUsualString(cart, cutterVar, cutterDefault);
 puts("<P><B>Filter display by enzymes (separate with commas):</B><BR>");
 cgiMakeTextVar(cutterVar, enz, 100);
 }
 
 void genericWiggleUi(struct trackDb *tdb, int optionNum )
 /* put up UI for any standard wiggle track (a.k.a. sample track)*/
 {
 
 char options[7][256];