7713a08da69691ba499d5b9d44379c43e8cdb608
markd
  Fri Sep 18 09:27:52 2026 -0700
Adding Transcription Start container with ENCODE 4 PRO-cap and ProCapNet tracks. refs #35528

New superTrack transcriptionStart in the rna group, holding two faceted
composites: encode4ProCap with PRO-cap measurements and proCapNet with the
model predictions and sequence-contribution scores.  hg38 has all three data
types, hs1 the predictions only.

ENCODE 4 PRO-cap comes from the portal rather than the submitter's hub copy.
For each of the six experiments only the plus and minus strand signal of unique
reads files of that experiment's default analysis are taken, which drops files
superseded by a later reprocessing.  ENCODE publishes no pooled file, so the
per-replicate files are summed per cell line and strand, the same merge the
ProCapNet models were trained on.  Total signal is conserved exactly.

The published ProCapNet prediction bigWigs store one bedGraph interval per base
and hold a literal NaN at every unresolved (N) base on hg38, which makes
autoScale and every summary statistic NaN.  They are re-encoded into fixedStep
sections, a third smaller with no value changed, dropping 164,268,582 NaN bases
of 3,088,269,832 on hg38 and none on hs1.  Losslessness verified against the
originals on random windows across five chromosomes.

The composites are faceted rather than plain because a container multiWig under
a plain composite is flattened away by hgTrackUi and never drawn.  Each cell
line is one row with a checkbox per data type, a Sample class facet, ENCODE
accession links and a Files column linking each bigWig on hgdownload.

Scripts and the cell line configuration are in makeDb/outside/proCapNet; the
trackDb stanzas and the faceted metadata tables are generated, not hand edited.

Claude-Session: https://claude.ai/code/session_01LAB6jWshLvB7eNXQKWVuW5

diff --git src/hg/makeDb/outside/proCapNet/proCapNetPredBuild src/hg/makeDb/outside/proCapNet/proCapNetPredBuild
new file mode 100755
index 00000000000..edfc00b2e49
--- /dev/null
+++ src/hg/makeDb/outside/proCapNet/proCapNetPredBuild
@@ -0,0 +1,29 @@
+#!/bin/bash -e
+# Re-encode all downloaded ProCapNet prediction bigWigs into fixedStep bigWigs.
+# usage: proCapNetPredBuild chrom.sizes inDir outDir [jobs]
+
+if [ $# -lt 3 ] ; then
+    echo "usage: proCapNetPredBuild chrom.sizes inDir outDir [jobs]" >&2
+    exit 1
+fi
+chromSizes=$1
+inDir=$2
+outDir=$3
+jobs=${4-4}
+scriptDir=$(dirname $0)
+
+mkdir -p $outDir
+# The download is named <cell>.<strand>.bigWig; the output says what the file
+# holds, <cell>.proCapNet.<strand>.bw, so a bigWig downloaded on its own still
+# names the model it came from.  Already-converted files are skipped, so an
+# interrupted run can be restarted.
+ls $inDir/*.bigWig \
+    | awk -v outDir=$outDir -v sizes=$chromSizes -v prog=$scriptDir/proCapNetPredToFixedStep \
+          '{n = $0; sub(/.*\//, "", n);
+            sub(/\.bigWig$/, "", n);
+            strand = n; sub(/.*\./, "", strand);
+            cell = n; sub(/\.[^.]*$/, "", cell);
+            out = outDir "/" cell ".proCapNet." strand ".bw";
+            if (system("test -s " out) != 0)
+                print prog, sizes, $0, out}' \
+    | xargs -d '\n' -P $jobs -I CMD sh -c CMD