0a5389e8b81efa99e932f5e9e2424b27ce1af095
max
  Sun May 17 14:53:57 2026 -0700
varFreqs: add GenomeIndia subtrack (9,768 WGS, 83 endogamous Indian populations, Bhattacharyya 2025) and wire into databases.tsv for the next varFreqsAll rebuild. TSV->VCF conversion synthesizes AC=round(AF*AN) with AN=19536 since the upstream release only ships AF, refs #36642

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

diff --git src/hg/makeDb/doc/hg38/varFreqs.txt src/hg/makeDb/doc/hg38/varFreqs.txt
index 3021ce4fef9..0cf68f72103 100644
--- src/hg/makeDb/doc/hg38/varFreqs.txt
+++ src/hg/makeDb/doc/hg38/varFreqs.txt
@@ -723,15 +723,52 @@
 # (one-time link, registration required). The file is already on GRCh38 with
 # chr-prefixed chromosome names, autosomes only, sorted, and ships AC/AF/AN
 # plus matched 1KGP_* INFO fields. No conversion/lift/normalisation needed -
 # just index.
 ln -s mbiobank_ChinaMAP.phase1.vcf.gz chinamap.vcf.gz
 tabix -p vcf chinamap.vcf.gz
 # Final: 147,448,941 variants (matches the 136.75 M SNPs + 10.70 M indels
 # reported in Cao et al.). 2.0 GB bgzip + 2.1 MB tabix index.
 # Registered ChinaMAP in scripts/varFreqs/databases.tsv so the next
 # varFreqsAll combined-track rebuild picks it up:
 #   ChinaMAP    China ChinaMAP    /gbdb/hg38/varFreqs/_chinamap/chinamap.vcf.gz    AC    AF
 # The varFreqs.ra filter UI fragment (filterByRange.ChinaMAPAF/AC, sources
 # filterValues) is deliberately NOT added yet; it will be added together
 # with the next rebuild of varFreqsAll (WBBC/TPMI precedent), otherwise
 # the filters would appear in the UI before the columns exist in the bb.
+
+##########
+# 2026-05-17 Claude max
+# GenomeIndia: 9,768 WGS, 83 endogamous Indian populations
+# (Bhattacharyya et al. 2025 Nat Genet, PMID 40200122,
+# DOI 10.1038/s41588-025-02153-x).
+#
+# Source: 22 per-chromosome TSV files (autosomes only, no header) with
+# CHROM/POS/ID/REF/ALT/AF columns, distributed by the Indian Biological
+# Data Centre as 9768GI_SummaryStats.tar.gz. The release ships only the
+# alternate allele frequency: no AC, no AN, no per-population breakdown.
+# 129,938,889 high-confidence biallelic variants total.
+cd /hive/data/genomes/hg38/bed/varFreqs/genomeindia
+# Download (already done; raw TSVs live under
+# /gbdb/hg38/varFreqs/genomeindia/9768GI_SummaryStats/ from the original
+# wget by Max).
+# Convert TSV -> sorted, bgzipped, tabix-indexed VCF. Script synthesizes
+# AN = 2 * 9768 = 19536 and AC = round(AF*AN). See script header for the
+# caveat re: NS_GT >= 98% upstream filter.
+python3 ~/kent/src/hg/makeDb/scripts/varFreqs/genomeindiaToVcf.py \
+    /gbdb/hg38/varFreqs/genomeindia/9768GI_SummaryStats \
+    genomeindia.vcf.gz
+# Output: 129,938,889 variants, 0 skipped; matches the paper exactly.
+# Final size: 791 MB bgzip + 1.9 MB tabix index.
+# Symlinks placed at /gbdb/hg38/varFreqs/_genomeindia/{genomeindia.vcf.gz,
+# .tbi} for the genomeindia stanza in trackDb/human/varFreqs.ra.
+#
+# Combined-track wiring (filter UI fragment is added now, in the same
+# style as the GenomeAsia rebuild precedent, because GenomeIndia/AC and
+# /AF will be present in the next varFreqsAll rebuild):
+#   1. Added GenomeIndia row to
+#      ~/kent/src/hg/makeDb/scripts/varFreqs/databases.tsv
+#      (key=GenomeIndia, ac_field=AC, af_field=AF, no populations).
+#   2. Added GenomeIndia|GenomeIndia 9.7k WGS to filterValues.sources
+#      and filterByRange.GenomeIndiaAF/AC stanzas in varFreqs.ra.
+# A full varFreqsAll rebuild has NOT been re-run yet; do that after QA
+# clears the standalone subtrack.