For each module, we calculated overlap enrichment or depletion with ancestry-associated DEGs (FDR < 0.05) separated by direction of effect (such as DEGs that are upregulated in AA, upregulated in EA or upregulated in either ancestry) using a two-sided Fisher’s exact test in Python with the SciPy85 stats module. P values were corrected using the statsmodels86 stats module with the Benjamini–Hochberg method in Python.