fd5b9c605c39c5b83b630926419897d9dbd69c37
gperez2
  Fri Jan 9 14:22:19 2026 -0800
Adding to the makedoc, the gnomAD v4.1 CNV track update with the gnomad.v4.1.cnv.all.bed data. Also, updated the hgdownload URL in the track description, refs #36837

diff --git src/hg/makeDb/doc/hg38/gnomad.txt src/hg/makeDb/doc/hg38/gnomad.txt
index 11de9862dd5..96c2bd84182 100644
--- src/hg/makeDb/doc/hg38/gnomad.txt
+++ src/hg/makeDb/doc/hg38/gnomad.txt
@@ -630,30 +630,46 @@
      20989 DEL
      25026 DUP
 
     #Made the as file and the file is located in the following directory: /hive/data/outside/gnomAD.4/cnv/gnomadCNV.as
     
     #Made a bigBed9plus
     for f in gnomad.v4.1.cnv.non_neuro_controls.bed9Plus; do out=${f/.bed9Plus/}; bedToBigBed -tab -type=bed9+12 -as=gnomadCNV.as -extraIndex=name $f /hive/data/genomes/hg38/chrom.sizes $out.bb; done
     
     cd /gbdb/hg38/gnomAD/v4
     mkdir cnv; cd cnv
     ln -s /hive/data/outside/gnomAD.4/cnv/gnomad.v4.1.cnv.non_neuro_controls.bb
     cd ~/kent/src/hg/makeDb/trackDb/human/hg38
     #Edited the gnomad.alpha.ra file
     cp gnomadSv.html gnomadCNV.html
     #Updated the gnomadCNV.html
+
+# UPDATE to the gnomAD v4.1 CNV track #36837:
+# We reached out to gnomAD, and they said that the gnomad.v4.1.cnv.non_neuro_controls.bed file we
+# used to build the gnomAD v4.1 CNV track contains CNVs computed on a subset of samples. The file
+# that contains the site count across all of the 464,297 exomes is gnomad.v4.1.cnv.all.bed. See
+# #36837 for more details. I updated the gnomAD v4.1 CNV track with the gnomad.v4.1.cnv.all.bed
+# data. The site count now shows 114 for the GD_16p11.2-BP4-BP5__DEL variant, which matches the
+# gnomAD website.
+
+    # Took similar steps to what is noted above and ran the following commands to update the track:
+    wget https://storage.googleapis.com/gcp-public-data--gnomad/release/4.1/exome_cnv/gnomad.v4.1.cnv.all.bed
+
+    for f in gnomad.v4.1.cnv.all.bed; do out=${f/.bed/}; cat $f | tail -n +101 | awk 'BEGIN {FS=OFS="\t"} {gsub("variant_is_80_", "", $4); print $1, $2, $3, $4, 0, ".", $2, $3, $9, $13, $14, $19, $22, $32, $42, $52, $62, $72, $82, $92, $102}' | awk 'BEGIN {FS=OFS="\t"} {if ($11 == "DEL") $9="255,0,0"; else if ($11 == "DUP") $9="0,0,255"; print}' > $out.bed9Plus; done
+
+    # Updated the as file: /hive/data/outside/gnomAD.4/cnv/gnomadCNVall.as
+    for f in gnomad.v4.1.cnv.all.bed9Plus; do out=${f/.bed9Plus/}; bedToBigBed -tab -type=bed9+12 -as=gnomadCNVall.as -extraIndex=name $f /hive/data/genomes/hg38/chrom.sizes $out.bb; done
 ##############################################################################
 # Update gnomAD Structural Variants v4 - Gerardo
 # Redmine #35295
 # Adding a filter to show only the PASS variants and updating the mouseOver per Anna's request.
 
 # The gnomad.v4.1.sv.non_neuro_controls.sites.bed.gz file has a FILTER field (978) that consists of the following:
     zcat /hive/data/outside/gnomAD.4/sv/gnomad.v4.1.sv.non_neuro_controls.sites.bed.gz | cut -f978 | sort | uniq -c | sort -nr
     1199117 PASS
      278316 UNRESOLVED
      186815 LOWQUAL_WHAM_SR_DEL,OUTLIER_SAMPLE_ENRICHED
      131479 LOWQUAL_WHAM_SR_DEL
      109905 OUTLIER_SAMPLE_ENRICHED
       82853 HIGH_NCR
       79159 HIGH_NCR,UNRESOLVED
       70291 HIGH_NCR,LOWQUAL_WHAM_SR_DEL