d0632693bee08bf61b7990e0c6a1de8c050e337f
mspeir
  Sat Aug 1 20:53:09 2026 -0700
singleCellSignalsPeaks: color by cell class, harmonize labels and facets (hg38)

Overhaul of the hg38 track and the shared build scripts it and the mm10 track
are generated from:

- Color every subtrack by broad cell class from one colorblind-conscious palette
(shared with the mm10 track, so a class is the same color on both assemblies);
add a color legend to the description page.
- Add a "Cell class" facet; the fine cell type becomes a searchable table column.
Group subtracks by class via priority; every subtrack is off by default.
- Paper-curated cell-type names, redundant-synonym merges, QC-cluster drop, and
per-collection tissue/life-stage/condition (including the SEA-AD region and
ADNC neuropathology level, from Gabitto 2024 and Hawrylycz 2024).
- Rebuild the longLabels from the harmonized cell type + facets, so the cryptic
source short labels decode.
- Reclassify 10 mislabeled interaction bigBeds out of the signal/peaks composite,
retype a narrowPeak-format bigBed, and drop deprecated *.old data
(936 -> 925 subtracks).
- Archive the curation with the scripts: build_celltype_crosswalks.py and
celltype-crosswalks/ (per-collection crosswalks, palette, class map, and the
paper-decode source tables).

refs #37914

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

diff --git src/hg/makeDb/doc/hg38/singleCellSignalsPeaks.txt src/hg/makeDb/doc/hg38/singleCellSignalsPeaks.txt
index fa949999a02..ed61e982ffd 100644
--- src/hg/makeDb/doc/hg38/singleCellSignalsPeaks.txt
+++ src/hg/makeDb/doc/hg38/singleCellSignalsPeaks.txt
@@ -51,22 +51,35 @@
 #   python3 $scriptDir/makeSingleCellSignalsPeaksRa.py \
 #       --stanzas /hive/users/mspeir/claude/cell-browser/all-tracks-hub-build/stanzas/hg38.trackDb.txt \
 #       --out $HOME/kent/src/hg/makeDb/trackDb/human/hg38/singleCellSignalsPeaks.ra
 #
 # https://github.com/ucscGenomeBrowser/kent/tree/master/src/hg/makeDb/scripts/singleCellSignalsPeaks
 
 ##############################################################################
 # 4. Facet metadata
 ##############################################################################
 # The faceted composite's metaDataUrl points at a copy of the hub's hg38
 # main-faceted metadata (primaryKey = Track):
 #
 #   cp /hive/users/mspeir/claude/cell-browser/all-tracks-hub-build/meta/hg38.metadata.tsv \
 #      /hive/data/genomes/hg38/bed/singleCellSignalsPeaks/singleCellSignalsPeaks_metadata.tsv
 
+##############################################################################
+# 5. Labels, colors, and facets
+##############################################################################
+# The cell type / cell class / longLabel / color / facet values are all derived
+# by build_stanzas.py, not copied from the source hubs. That logic (paper-curated
+# cell-type crosswalks, the shared broad-class color palette, the rebuilt
+# longLabels, and the per-collection tissue/life-stage/condition parsing incl.
+# SEA-AD region + ADNC) is documented once in doc/mm10/singleCellSignalsPeaks.txt
+# section 4; it runs identically for hg38. Tracks are colored by broad cell class
+# from the same palette as mm10, so a class is the same color on both assemblies.
+
 ##############################################################################
 # Counts
 ##############################################################################
-# 936 subtracks across 9 datasets: human-enhancer-atlas (444), sea-ad-brain-atac
-# (184), cortex-atac (91), retina (69), neuro-degen-atac (67),
+# 936 files resolved across 9 datasets: human-enhancer-atlas (444),
+# sea-ad-brain-atac (184), cortex-atac (91), retina (69), neuro-degen-atac (67),
 # multiomic-human-heart (40), cardiogenesis-atac (19), olg-eae-ms (18),
-# brainvar (4). Facet metadata rows match the subtracks 1:1.
+# brainvar (4). 10 mislabeled interaction bigBeds (cortex-atac interact.old/) are
+# reclassified to the interact composite and 1 QC cluster is dropped, leaving 925
+# subtracks in the track. Facet metadata rows match the subtracks 1:1.