f665d4cc3b02924a8507b2f910eaf85eab54d433
braney
Sat Jul 18 14:12:24 2026 -0700
hprc2X: left-shifted HPRC r2 deletion analysis and external-catalog cross-reference scripts
Deletion-only re-derivation of the HPRC Release 2 rearrangement track used to
test left-shifting indel placement and to measure how the deletions correspond
to dbSNP, DGV, ClinVar, and the previous (rel1) release. Includes the unbounded
left-normalizer, the aggregation and subsampling drivers, the stability and
cross-release carryover analyses, and the dbSNP rs cross-reference prototype.
See README.txt for the manifest; full results and cached data live in
/hive/data/genomes/hg38/bed/hprc2X.
refs #37891
diff --git src/hg/makeDb/scripts/hprc2X/buildDel.sh src/hg/makeDb/scripts/hprc2X/buildDel.sh
new file mode 100755
index 00000000000..4d61d43c388
--- /dev/null
+++ src/hg/makeDb/scripts/hprc2X/buildDel.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+set -beEu -o pipefail
+D=/hive/data/genomes/hg38/bed/hprc2X; cd $D
+export PATH=$HOME/bin/x86_64:/cluster/bin/x86_64:/cluster/bin/scripts:$PATH
+export TMPDIR=$D/sortTmp
+AS=$HOME/kent/src/hg/makeDb/scripts/hprc2X/hprc2XArrange.as
+hgSizes=/hive/data/genomes/hg38/chrom.sizes
+awk '($3>$2)&&($5==0)' arr/*.indel.txt | gnusort -S32G --parallel=16 -k1,1 -k2,2n -k3,3n > delSorted.txt
+echo "raw deletion rows (all assemblies): $(wc -l < delSorted.txt)"
+chainArrangeCollect -exact arrDel delSorted.txt stdout \
+ | awk 'BEGIN{OFS="\t"}{s=$3-$2; print $1,$2,$3,$4,($5>1000?1000:$5),$6,$7,$8,"200,0,0",$10,0,$5":"s"bp",s,"Deletion relative to GRCh38
Size: "s" bp
Assemblies with deletion: "$5}' \
+ | gnusort -S16G -k1,1 -k2,2n > del.bed
+echo "collapsed deletion events: $(wc -l < del.bed)"
+bedToBigBed -tab -type=bed9+5 -as="$AS" del.bed "$hgSizes" out/hprc2XDel.bb 2>&1 | tail -2
+echo "DONE bigBed: $(bigBedInfo out/hprc2XDel.bb 2>/dev/null | grep itemCount)"