53ab3f1e293a91ddf71ec7568f4a6ff827bcd278 lrnassar Fri Oct 2 13:52:36 2026 -0700 Native GPN-Star track (Ye, Benegas et al., Nature 2026) on hg38, mm39, galGal6, dm6 and ce11, from the authors' Hugging Face hub. Each model is a multiWig sequence logo plus a four-allele -LLR composite using negateValues. The three hg38 models (V/M/P) sit in predictionScoresSuper via human/gpnStar.ra with /gbdb/$D bigDataUrls so -strict drops them on other human assemblies; the other four get a standalone gpnStar superTrack. The authors' bigWigs come from pyBigWig, whose bwAddIntervalSpanSteps writes the last section of each run 6 bases too long (pyBigWig #166) and makes bigWigAverageOverBed and bigWigCorrelate abort, so gpnStarRebuild.sh re-encodes them with wigToBigWig and gpnStarVerify.sh checks every per-base value is unchanged. Entropy scores and the GenArk-only Arabidopsis set are left out, and pennantIcon still has #TBD placeholders for the newsarch anchor and date. refs #38451 diff --git src/hg/makeDb/scripts/gpnStar/gpnStarVerify.sh src/hg/makeDb/scripts/gpnStar/gpnStarVerify.sh new file mode 100755 index 00000000000..15f6ea5a6a5 --- /dev/null +++ src/hg/makeDb/scripts/gpnStar/gpnStarVerify.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Verify that a re-encoded GPN-Star bigWig holds exactly the same per-base values as the +# original: same chromosome set, identical bigWigToBedGraph output on every chromosome +# (compared per chromosome, since kent writes chromosomes in a different order), and no +# bad section headers. +# usage: gpnStarVerify.sh orig.bw rebuilt.bw +set -beEu -o pipefail +orig=$1; new=$2 +chroms() { bigWigInfo -chroms $1 | awk 'NR>1 && /^\t/ {print $1}' | sort; } +if [ "$(chroms $orig)" != "$(chroms $new)" ]; then + echo "FAIL $orig chromosome sets differ"; exit 1 +fi +for c in $(chroms $orig); do + a=$(bigWigToBedGraph -chrom=$c $orig stdout | md5sum | cut -d' ' -f1) + b=$(bigWigToBedGraph -chrom=$c $new stdout | md5sum | cut -d' ' -f1) + if [ "$a" != "$b" ]; then + echo "FAIL $orig $c orig=$a rebuilt=$b"; exit 1 + fi +done +bad=$($(dirname $0)/gpnStarCheckSections.py $new 0 | awk -F': ' '/^sections=/{print $2}') +if [ "$bad" != "0" ]; then + echo "FAIL $new bad sections $bad"; exit 1 +fi +echo "OK $orig values identical on $(chroms $orig | wc -l) chromosomes, bad sections 0"