a37d4ffb473b6ebf6c66545f2b7d5f7eef35ef4b
max
  Fri Apr 10 03:00:33 2026 -0700
Color strVar subtracks by expected heterozygosity instead of motif period, fix hgTrackUi filter label truncation, refs #36652

Change all four strVar subtracks (webstr, tommoStr, trexplorer, viennaVntr) from
motif-period-based coloring to expected heterozygosity (het = 1 - sum(p_i^2)),
using a blue-to-red heat map: dark blue (het<0.1) through medium blue, light
purple, salmon, to dark red (het>=0.7). Add het as a filterable bigBed field with
scoreFilter and filterByRange on each track. Update mouseOver, track docs, and
makedoc. Also fix hgTrackUi to strip the "|..." suffix from autoSql comments
when displaying numeric filter labels.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index 59af3ca44cd..3aa37e9c255 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -6874,32 +6874,35 @@
     if (!isHubTrack(db))
         conn = hAllocConnTrack(db, tdb);
     struct asObject *as = asForTdb(conn, tdb);
     hFreeConn(&conn);
 
     while ((filter = slPopHead(&trackDbFilters)) != NULL)
         {
         char *field = filter->fieldName;
         char *scoreName = cloneString(filter->name);
         char *trackDbLabel = getLabelSetting(cart, tdb, field);
 
         if (as != NULL)
             {
             struct asColumn *asCol = asColumnFind(as, field);
             if (asCol != NULL)
-                { // Found label so replace field
+                { // Found label so replace field; strip "|..." suffix used for detail page
                 field = asCol->comment;
+                char *pipe = strchr(field, '|');
+                if (pipe != NULL)
+                    field = cloneStringZ(field, pipe - field);
                 }
             else if (defaultFieldLocation(field) < 0)
                 errAbort("Building filter on field %s which is not in AS file.", field);
             }
         char labelBuf[1024];
         char *label = labelBuf;
         char *filterName = getScoreNameAdd(tdb, scoreName, _BY_RANGE);
         boolean filterByRange = trackDbSettingClosestToHomeOn(tdb, filterName);
 
         if (trackDbLabel)
             label = trackDbLabel;
         else
             {
             if (isHighlight)
                 safef(labelBuf, sizeof(labelBuf),"%s%s", filterByRange ? "": "Highlight items with Minimum ", field );