For local ancestry differential expression analysis, we first calculated a local African ancestry score per feature (that is, gene, transcript, exon and junction). Then, we averaged all haplotypes within a 200-kbp window of each feature using the RFMix results. Following this estimate of local African ancestry per feature, we applied a separate linear model per feature using equation (1) modified for local ancestry. We limited our analysis to features tested for global ancestry differential expression. As each model was per feature, we replaced voom-normalized with counts per million log-normalized counts. We fitted our model with limma (v.3.46.0; R v.4.2) lmFit and extracted the effect size and s.e. for downstream mash modeling as described in ‘Global ancestry-associated differential expression analysis’. We compared the local and global ancestry differential expression results and found a large overlap (Supplementary Fig. 40).