aac682d3e89d0197a6467ae5231d3fe979f06d87
max
  Tue Sep 15 05:30:48 2026 -0700
danioCode: un-nest the standalone data types, split CRISPR out of DC Conservation

Give RNA-seq, CAGE-seq, 3P-seq, ChIP-seq and Hi-C their own top-level track in
an existing group (rna/genes/regulation) instead of hiding all eleven DANIO-CODE
containers behind one superTrack that only someone already looking for
DANIO-CODE would open. The Burgess lab's CRISPR/Cas9 target-site tracks, which
were riding along inside the "DC Conservation" composite, get their own
top-level superTrack (dcCrispr, group map) instead, mirroring where hg38 keeps
its own unrelated crispr tracks, and drop the "DC" branding since they aren't
DANIO-CODE's data. The rest -- a mixed bag of regulatory-element/annotation
containers that don't map onto any one existing group -- stay nested under the
danioCode superTrack.

Implemented in danioCodeHubToRa.py (STANDALONE_GROUP/NESTED_ORDER/CRISPR_*) so
the regrouping survives the next hub re-import, then regenerated danioCode.ra
from the cached hub trackDb.txt. tdbQuery -check passes; still alpha only.

refs #38265

diff --git src/hg/makeDb/doc/danRer11/danioCode.txt src/hg/makeDb/doc/danRer11/danioCode.txt
index b00d4b0d671..3d2290b4127 100644
--- src/hg/makeDb/doc/danRer11/danioCode.txt
+++ src/hg/makeDb/doc/danRer11/danioCode.txt
@@ -126,15 +126,62 @@
 #    default.  The hub turns some RNA-seq samples on.  Which subset should be
 #    visible is an open question on #38239.
 #  - the three hub superTracks (COPEs/DOPEs, enhancer validation, comparative
 #    genomics) became composites, because a superTrack cannot sit inside another
 #    superTrack.  A composite needs its own 'type' -- hgTracks takes the
 #    container's draw handler from it and a hub superTrack carries none -- so the
 #    script borrows the first child's type.  Without it hgTracks says
 #    "No draw handler for dcCopes_and_dopes".
 #
 # The description page of dcComparativeGenomics has no reference: those tracks are
 # the Burgess lab's, not DANIO-CODE's, and the citation for them is still unknown.
 
 # Check that the browser reads the files and draws them.  Worth turning on all
 # eleven containers at once, which is what caught the missing 'type' above:
 #   https://hgwdev-max.gi.ucsc.edu/cgi-bin/hgRenderTracks?db=danRer11&position=chr1:20,000,000-20,100,000&hideTracks=1&danioCode=show&dcConsensus_promoters=pack&dcComp=full&dcRNAseqComposite=full&DCD002238SQ_pos=full
+
+# 2026-09-15 Claude max - un-nest danioCode: give the biggest/most generic
+# containers their own top-level slot instead of hiding all eleven behind one
+# superTrack nobody but a DANIO-CODE-aware user would ever open, and split the
+# Burgess-lab CRISPR tracks out of "DC Conservation" since they aren't
+# DANIO-CODE's own data.
+#
+#   RNA-seq            -> top-level, group rna
+#   CAGE-seq, 3P-seq    -> top-level, group genes
+#   ChIP-seq, Hi-C      -> top-level, group regulation
+#   CRISPR (was part of dcComparativeGenomics) -> new top-level superTrack
+#     dcCrispr, group map (mirrors where hg38 keeps its own, unrelated, crispr
+#     tracks), shortLabel/longLabel carry no "DC"/DANIO-CODE branding since
+#     these are the Burgess lab's, not the consortium's
+#   comp, comp_cell_type, copes_and_dopes, evalidation, the remaining
+#     (conservation-only) dcComparativeGenomics, consensus_promoters
+#                       -> stay nested under the danioCode superTrack: a mixed
+#                          bag of regulatory-element/annotation tracks that
+#                          don't map onto one existing group
+#
+# Implemented in the converter (STANDALONE_GROUP / NESTED_ORDER / CRISPR_* at
+# the top of danioCodeHubToRa.py) so it survives the next hub re-import, rather
+# than hand-editing the generated .ra.  Re-run against the cached hub trackDb.txt:
+
+cd /hive/data/genomes/danRer11/bed/danioCode
+~/kent/src/hg/makeDb/scripts/danioCode/danioCodeHubToRa.py \
+    trackDb.txt \
+    https://trackhub2.genereg.net/DANIO-CODE/danRer11/ \
+    danioCode.ra \
+    --drop-list missingUrls.txt \
+    --local-prefix /gbdb/danRer11/danioCode
+# wrote danioCode.ra: 897 stanzas emitted, 4 dropped (same as before -- the
+# restructuring only moves stanzas around and adds one synthetic superTrack
+# stanza, it drops nothing new)
+
+cp danioCode.ra ~/kent/src/hg/makeDb/trackDb/zebrafish/danRer11/danioCode.ra
+
+# tdbQuery -check requires a superTrack's own children to sit contiguously right
+# after it in the file -- an unrelated top-level track (one of the newly
+# standalone composites) sitting between danioCode and one of its remaining
+# children fails with "X comes between parent (danioCode) and child (Y)".  So
+# TOP_ORDER emits danioCode's own children (NESTED_ORDER) immediately after the
+# danioCode stanza, then the standalone tracks, then dcCrispr.
+cd ~/kent/src/hg/makeDb/trackDb
+tdbQuery -check "select count(*) from danRer11"
+# no errors; still alpha-only via "include danioCode.ra alpha" in
+# zebrafish/danRer11/trackDb.ra, so none of this reaches beta/public yet.