da33d70c10ddaae6c3290cb900d7d0cc2b6ee01b
hiram
  Tue Mar 17 13:57:24 2026 -0700
allow calculation of GC percent on the fly with code help from claude refs #35958

diff --git src/hg/inc/hui.h src/hg/inc/hui.h
index 6eb630cc7e6..50d610d2a5c 100644
--- src/hg/inc/hui.h
+++ src/hg/inc/hui.h
@@ -86,30 +86,39 @@
 #define CUTTERS_TRACK_NAME "cutters"
 #define CUTTERS_TRACK_LABEL "Restr Enzymes"
 #define CUTTERS_TRACK_LONGLABEL "Restriction Enzymes from REBASE"
 #define CUTTERS_TRACK_PRIORITY 100
 
 /* Definition for oligo match track. */
 #define oligoMatchVar "hgt.oligoMatch"
 #define oligoMatchDefault ""
 #define oligoMatchStrandVar "hgt.oligoMatchStrand"
 #define oligoMatchStrandDefault "both"
 #define OLIGO_MATCH_TRACK_NAME "oligoMatch"
 #define OLIGO_MATCH_TRACK_LABEL "Short Match"
 #define OLIGO_MATCH_TRACK_LONGLABEL "Perfect Match to Short Sequence"
 #define OLIGO_MATCH_TRACK_PRIORITY 100
 
+/* Definition for GC on the fly track. */
+#define gcOnFlySizeVar "hgt.gcOnFly"
+#define gcOnFlyWindowSize "gcOnFlyWindowSize"
+#define gcOnFlyDefaultSize "5"
+#define GC_ON_FLY_TRACK_NAME "gcOnFly"
+#define GC_ON_FLY_TRACK_LABEL "GC FLY Percent"
+#define GC_ON_FLY_TRACK_LONGLABEL "GC FLY Percent in 5-Base Windows"
+#define GC_ON_FLY_TRACK_PRIORITY 110
+
 /* Definitions for User Psl track (hgBlat results). */
 #define USER_PSL_TRACK_NAME "hgUserPsl"
 #define USER_PSL_TRACK_LABEL "Blat Sequence"
 #define USER_PSL_TRACK_LONGLABEL "Your Sequence from BLAT Search"
 
 /* Display of bases on the ruler, and multiple alignments.
  * If present, indicates reverse strand */
 #define COMPLEMENT_BASES_VAR    "complement"
 /*	For trackUi and hgTracks, motif highlight options	*/
 #define BASE_MOTIFS	"hgt.motifs"
 #define MOTIF_COMPLEMENT	"hgt.motifComplement"
 #define BASE_SCALE_BAR  "hgt.baseShowScaleBar"
 #define BASE_SHOWRULER  "hgt.baseShowRuler"
 #define BASE_SHOWPOS	"hgt.baseShowPos"
 #define BASE_SHOWASM	"hgt.baseShowAsm"
@@ -1613,16 +1622,20 @@
 /* For reasons Angie cannot fathom, if a composite or view is passed to cfgByCfgType then
  * cfgByCfgType passes a leaf subtrack to its callees like bigDbSnpCfgUi.  That is why we
  * see so many calls to isNameAtParentLevel, which returns true if the tdb was originally
  * at the composite or view level, which we can only tell by comparing with the original track name.
  * labelMakeCheckBox, called by many handlers in hgTrackUi that must be always top-level
  * (or have a special handler that bypasses cfgByCfgType like refSeqComposite),
  * is blissfully unaware of this.  It uses the same tdb for looking in cart ClosestToHome
  * and for making the HTML element's cart var name, trusting that the correct tdb has been
  * handed to it.
  * So in order for a callee of cfgByCfgType to call labelMakeCheckBox with the correct tdb,
  * we need to walk back up comparing name like isNameAtParentLevel does.
  * If name doesn't match tdb or any of its ancestors then this returns NULL. */
 
 char *getTrackHtml(char *db, char *trackName);
 /* Grab HTML from trackDb in native database for quickLift tracks. */
+
+char *gcOnFlyWinSize(struct cart *cart);
+/* Return window size for GC on the fly track calculation */
+
 #endif /* HUI_H */