bdf448295c10bee74b6baa773f6733ce33171996
markd
  Thu Oct 1 20:56:37 2026 -0700
Store the ProCapNet minus strand negated, and fix group autoscale. refs #35528

Two of the three problems Jairo found on the composite.

The negate control did not work on ProCapNet. Its minus-strand files held
positive values and were flipped at display time with trackDb negateValues. The
composite's control sets one shared value, which replaced the per-track setting
and sent both strands the same way, with no route back to the default short of a
cart reset. encode4ProCap was fine because ENCODE publishes its minus strand
negative already. So put the sign in the data: proCapNetPredToFixedStep gains
--negate, proCapNetPredBuild passes it for the minus strand, and negateValues is
gone from the stanzas. The twelve existing files were rewritten rather than
rebuilt, since the downloads had been deleted; each was checked against its
original for identical nBasesCovered, a mirrored value range and exactly negated
values. The originals are kept in previousPred, about 197 GB, until QA is done.

Group autoscale on the composite did nothing, which was my error: the multiWig
containers and the contribution leaves each carried autoScale on, and the child
setting wins. The wiggle settings now live only on the composite.

The third, an empty row when both strands of a cell line are deselected, is
#38441 and is not fixed here.

Note in both makedocs and in the generator that this arrangement only partly
works and is expected to become a superTrack of multiWig overlays: under a
composite, hgTrackUi lists leaves rather than containers, so an overlay gets no
inline config block and leaves an empty row when deselected.

diff --git src/hg/makeDb/outside/proCapNet/proCapNetPredBuild src/hg/makeDb/outside/proCapNet/proCapNetPredBuild
index edfc00b2e49..e6630c773e9 100755
--- src/hg/makeDb/outside/proCapNet/proCapNetPredBuild
+++ src/hg/makeDb/outside/proCapNet/proCapNetPredBuild
@@ -3,27 +3,29 @@
 # 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
+# names the model it came from.  The minus strand is written negated, so it draws
+# below the baseline from its own values rather than from a trackDb setting.  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";
+            negate = (strand == "neg") ? "--negate" : "";
             if (system("test -s " out) != 0)
-                print prog, sizes, $0, out}' \
+                print prog, negate, sizes, $0, out}' \
     | xargs -d '\n' -P $jobs -I CMD sh -c CMD