78988553dd9b460c26f0b9f21f15a1aacfad9dab
lrnassar
  Fri Aug 21 15:44:40 2026 -0700
Polish pass on the mouseDevTimecourse tracks after a Playwright QA sweep. refs #37001

Sentence-case the tissue names and the facet column titles, so the barChart
facet filter reads "Tissue / Spleen" rather than "tissue / spleen" and the
bigWig matrix reads "Spleen". Only the first character is upper-cased. Added
sentenceCaseTissues.sh, which does the .facets and .categories files and is
idempotent, since the hub still ships lower-case and this has to be replayed
after any refetch. The count and color column names are deliberately left
lower-case: barChartUi.c requires a field literally named "count" to load the
file at all, and facetedTable.c keys its merge logic on "count", "color" and
"val". Renaming the faceted columns means trackDb matches, so the stanzas now
read barChartFacets Tissue,Timepoint.

Set priority on the container children so the default-visible M21 TPM sorts
first and the signal composite sorts last. The composite needs an explicit
value; without one it inherits the superTrack's 0.6 and floats to the top.

Fix the All reads view, which was inert. Every all-reads subtrack shipped
parent off, so switching the view to full revealed nothing. The view's own
visibility already gates drawing, so the subtrack state should not encode the
view as well. The default image is unchanged at 78 unique-reads rep1 tracks,
and switching the view to full now yields 156. This also makes the Rep 2
toggle symmetric across the two views.

Rename the bigWig subGroup3 display label from Age to Timepoint, matching the
barChart facet and the .facets column. The group name stays "age" because
dimensions and sortOrder reference it by name.

Add relatedTracks cross-links between the mm10 container and Tabula Muris.
Not Tabula Muris Senis, which is not on the RR.

Description pages: reorder the mm10 subtrack list to match the new display
order, "sub tracks" to "subtracks", capitalise the colour legend tissue names,
and correct the mm39 Il11ra2 note - the gene appears three times, two of them
stacked at one position and sharing a details page, with the third 497 kb away.

Makedocs record the casing step, its ordering constraint relative to the
reorder and colour steps, and the count/color naming constraint.

diff --git src/hg/makeDb/scripts/mouseDevTimecourse/sentenceCaseTissues.sh src/hg/makeDb/scripts/mouseDevTimecourse/sentenceCaseTissues.sh
new file mode 100755
index 00000000000..f24d0083d79
--- /dev/null
+++ src/hg/makeDb/scripts/mouseDevTimecourse/sentenceCaseTissues.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+# Sentence-case the tissue names and the facet column titles in the Wold Lab
+# mouse development .facets and .categories files, so the barChart facet filter
+# reads "Tissue / Spleen" rather than "tissue / spleen".
+#
+# Only the first character is upper-cased: "skeletal muscle tissue" becomes
+# "Skeletal muscle tissue", not Title Case.
+#
+# What is changed:
+#   .facets     header row  - the tissue and timepoint column names only
+#               data rows   - the label (col 1) and the tissue (col 3)
+#   .categories data rows   - the label (col 1), which must stay identical to
+#                             the .facets label column
+#
+# What is deliberately NOT changed: the count and color column names. hgTracks
+# matches those by exact lower-case string - barChartUi.c requires a field
+# literally named "count" to load the file at all, and facetedTable.c keys its
+# merge logic on "count", "color" and "val". Renaming them breaks the track.
+# Timepoint values, colours and row order are also untouched; row order matters
+# because the bigBed expScores are positional.
+#
+# Renaming the tissue/timepoint columns means trackDb must match, since facets
+# are resolved by column name:  barChartFacets Tissue,Timepoint
+#
+# The hub at woldlab.caltech.edu still ships lower-case, so like the tissue
+# reorder and the colour update this has to be reapplied after any refetch.
+# Idempotent, so re-running is safe. See #37001.
+#
+# Usage: sentenceCaseTissues.sh <file.facets|file.categories> ...
+# Originals are kept alongside as <name>.preCase
+
+set -euo pipefail
+
+[ $# -ge 1 ] || { echo "usage: sentenceCaseTissues.sh <file> ..." >&2; exit 1; }
+
+for F in "$@"; do
+    [ -s "$F" ] || { echo "missing: $F" >&2; exit 1; }
+    NAME=$(basename "$F")
+    case "$NAME" in
+        *.facets)     KIND=facets ;;
+        *.categories) KIND=categories ;;
+        *) echo "$NAME is neither .facets nor .categories" >&2; exit 1 ;;
+    esac
+
+    awk -F'\t' -v OFS='\t' -v k="$KIND" '
+        function cap(s) { return toupper(substr(s,1,1)) substr(s,2) }
+        NR==1 && k=="facets" {
+            # Facet column titles are rendered verbatim, so capitalise the two
+            # faceted columns. Leave count and color alone: matched by exact
+            # lower-case string in the C code.
+            for (i=1; i<=NF; i++)
+                if ($i=="tissue" || $i=="timepoint") $i = cap($i)
+            print; next
+        }
+        NF==0 { print; next }
+        {
+            $1 = cap($1)                                  # label
+            if (k=="facets" && NF>=3) $3 = cap($3)         # tissue value
+            print
+        }' "$F" > "$F.tmp"
+
+    before=$(wc -l < "$F"); after=$(wc -l < "$F.tmp")
+    [ "$before" = "$after" ] || { echo "row count changed $before -> $after" >&2; rm -f "$F.tmp"; exit 1; }
+
+    if cmp -s "$F" "$F.tmp"; then
+        rm -f "$F.tmp"; echo "  $NAME already sentence-cased, unchanged"
+    else
+        [ -e "$F.preCase" ] || cp -p "$F" "$F.preCase"
+        mv "$F.tmp" "$F"; chmod 664 "$F"
+        echo "  $NAME: $after rows updated"
+    fi
+done