We calculated the level of activity of each collection of gene sets with the AUCell method47 on the list of TF-gene regulatory networks or custom gene sets (described below). For the TF-gene relationships identified above, we calculated the differentially active TF-gene modules between unaffected and OUD individuals by creating the pseudobulk average of each TF-module by individual, brain region, and cell type. We performed linear regressions to assess the effect of OUD diagnosis accounting for covariates RIN, Age, Sex, Region, and number of aggregated cells. We corrected multiple testing of the OUD effect on TF-gene module activity across all cell types and TF modules and reported the full cell type by sample linear regression are reported in Supplementary Data 1–S8. We similarly performed a similar pseudobulk average at the biological sample level aggregating over individual and brain regions. We visualized the significant TF-gene module activity differences set at FDR < 0.05 in glia and neurons and of select modules with the igraph R-package (igraph.org).