hdWGCNA was used to further analyze gene co-expression networks across striatal cell types147. Each of 6 cell types of interest (D1-Striosome, D2-Striosome, D1-Matrix, D2-Matrix, D1-D2 hybrid and microglia) was used as input. Gene expression data was SCT transformed. Each dataset was then collapsed into a single metacell. Softpower was selected for each of the metacell to construct gene co-expression networks. The gene modules were identified using unsupervised clustering via the Dynamic TreeCut algorithm with default settings. For each module, Top 100 hub genes for each module were identified. Metascape (metascape.org)148 was used for pathway analysis on modules from co-expression gene networks by each cell type (Fig. S11; Data 1–S18). Eigengene of identified modules was correlated with “traits” (in our case, OUD, Sex, Race and RIN, number of features, number of RNA count and percent of mitochondrial RNA) using Pearson correlation. Modules with significant correlation (p < 0.05) with OUD were used for downstream analysis (Data 1–S21, S22), especially, modules significant with OUD (Figs. S9, 10, 11; Data 1–S18, S19) were prioritized. For cell types with no module uniquely correlated with OUD, hub genes from all OUD trait correlated modules were used as input for pathway analysis (Data 1–S23–S25).