6b285a53b036b309e3c7a9b61d3741731088a172 lrnassar Fri Jun 12 02:35:01 2026 -0700 varFreqs: switch affectedAF/backgroundAF from max-across-cohorts to pooled sum(AC)/sum(AN) so the rate matches the carrier count scale. Per-arm AN is derived as round(AC/AF) when both are reported. An optional "default_an" column was added to databases.tsv so AF-only cohorts (ABraOM, ALFA) can synthesize a denominator from their cohort size; without it those cohorts had been silently dropped from the pooled rate. New affectedAN and backgroundAN columns expose the pool denominator. The mouseOver now reads "Affected AC/AN: 33238 / 213153" so the ratio is visible. Per-arm cohorts that ship only AC and no default_an (MGRB, GREGoR AC_AFFECTED/UNAFFECTED/UNKNOWN, AllOfUs per-population) are still listed in affectedCohorts/backgroundSources but contribute 0 to the pool, preserving the invariant pool_AF <= 1. The build pipeline is unchanged: re-run vcfToBigBed.py --split-affected against the existing merged.annotated.vcf.gz. refs #36642 diff --git src/hg/makeDb/trackDb/human/varFreqsAffected.html src/hg/makeDb/trackDb/human/varFreqsAffected.html index 0099d2fda9d..36af10b8e43 100644 --- src/hg/makeDb/trackDb/human/varFreqsAffected.html +++ src/hg/makeDb/trackDb/human/varFreqsAffected.html @@ -30,55 +30,68 @@
-The score (used for shading) is the affected/case allele frequency times 1000. Variants -contributed only by a cohort that reports allele counts but no allele frequency (GREGoR) -have a score of 0 but are still drawn in their consequence color. +The score (used for shading) is the pooled affected/case allele frequency times 1000. +
+ +
+Affected AF is the pooled rate across contributing affected arms:
+affectedAF = sum(AC) / sum(AN), where affectedAC sums the allele counts
+and affectedAN sums the allele numbers across each cohort/arm that ships both AC and
+AF (the per-arm AN is derived as round(AC / AF)). Cohorts that publish only AF
+contribute via a configured default_an in the build configuration. Cohorts
+that publish only AC and have no default_an set (currently GREGoR's per-arm
+AC_AFFECTED/UNAFFECTED/UNKNOWN) are listed in affectedCohorts but do not contribute
+to the pool numerator or denominator; their carriers are visible in the per-database AC
+column instead. The pooled rate is preferred over a max-across-cohorts statistic so a
+small cohort with a high local AF cannot dominate the displayed frequency.
To look for protein-truncating variants that are common in affected individuals but rare in the background, set the Consequence filter to Stop Gained, Frameshift, Splice Donor and Splice Acceptor (these appear red), then add an upper limit on the Background AF filter. Each variant here carries both its affected frequency and its background frequency, so this isolates variants seen in cases with little or no presence in the population/unaffected set. Comparing visually against the Population + Unaffected track shows the same contrast across a whole gene.
Variant-frequency VCFs from the contributing cohorts were stripped of unneeded INFO fields,
normalized with bcftools norm (splitting multi-allelic sites), and merged with
bcftools merge. The merged callset was annotated with predicted protein
consequences using bcftools csq against the
Ensembl
GRCh38 release 115 gene models.