CIGMA
We developed CIGMA to unbiasedly quantify cell-type-shared and cell-type-specific eQTLs in scRNA-seq data. CIGMA avoids bias from eQTL detection power by using a linear mixed model, similar to the GREML model of complex trait heritability12. CIGMA models cell-type-specific pseudobulk data, which is computed by averaging across all cells in predefined cell types, one gene at a time. Mathematically, CIGMA models eQTL l in cell type c as the sum of a cell-type-shared effect (α l ) and a cell-type-specific effect (γ lc ):
$${Y}_{{ic}}={\mu }_{c}+\mathop{\sum }\limits_{l=1}^{L}{G}_{{il}}\,({\alpha }_{l}+{\gamma }_{{lc}})+{e}_{{ic}}+{{\epsilon }}_{{ic}}$$ (1)
Y ic is the pseudobulk gene expression for individual i and cell type c. μ c captures the average expression in cell type c across individuals. G il is the genotype for individual i at eQTL l, with cell-type-shared and cell-type-specific random effects: \({\alpha }_{l}\mathop{ \sim }\limits^{\text{iid}}N(0,{\sigma }_{{\rm{g}}}^{2}/L)\) and \({\gamma }_{{lc}}\mathop{ \sim }\limits^{\text{ind}}N(0,{v}_{c}/L)\). The residual interindividual term, e, models nongenetic variation across individuals as well as unmodelled genetic variation and is also partitioned into shared and specific random effects (\({\sigma }_{e}^{2}\) and w c )57. Finally, ϵ ic models variation across cells from individual i and cell type c, which may reflect experimental noise or cell subtypes and states. We use the cell-level data to precompute and subtract the cell-to-cell variation per individual and cell type, defined as the empirical variance across cells: \({\delta }_{{ic}}:= \frac{1}{{n}_{{ic}}({n}_{{ic}}-1)}{\sum }_{s=1}^{{n}_{{ic}}}{({y}_{{ics}}-{Y}_{{ic}})}^{2}\approx \mathrm{var}({{\epsilon }}_{{ic}})\), where n ic is the number of cells for individual i in cell type c and y ics is expression in cell s (Supplementary Note 1). In practice, we required each cell type to have more than 10 cells per individual57. CIGMA simplifies to the additive model, GREML, if v c , w c and δ are 0 (ref. 12) and simplifies to our previous CTMM model if genetic effects are 0 (ref. 57).
Algorithmically, CIGMA inputs genotype data and cell-type-specific pseudobulk for one gene. CIGMA outputs cell-type-shared (\({\sigma }_{{\rm{g}}}^{2}\)) and cell-type-specific (v) genetic variances, as well as shared (\({\sigma }_{e}^{2}\)) and specific (w) residual interindividual variances. We then define \(\mathrm{specificity}:= \frac{\bar{v}}{({\sigma }_{{\rm{g}}}^{2}+\bar{v})}\), where \(\bar{v}\) is the average of v c over cell types. Approximately, specificity ≈ 1 − r g , where r g is the genetic correlation across cell types. We define heritability relative to total interindividual variance, \({\sigma }_{\mathrm{tot}}^{2}:= {\sigma }_{{\rm{g}}}^{2}+\bar{v}+{\sigma }_{e}^{2}+\bar{w}\), with \({h}_{\mathrm{shared}}^{2}:= \frac{{\sigma }_{{\rm{g}}}^{2}}{{\sigma }_{\mathrm{tot}}^{2}}\) and \({h}_{\mathrm{specific}}^{2}:= \frac{\bar{v}}{{\sigma }_{\mathrm{tot}}^{2}}\).
CIGMA can jointly fit multiple genotype matrices (Supplementary Note 1), such as cis and trans regions. In this case, CIGMA outputs estimates of \({\sigma }_{{\rm{g}}}^{2}\) and v for each input genotype matrix.
CIGMA can also fit a ‘Full’ model of genetic covariance across cell types by \({\gamma }_{l,}\mathop{ \sim }\limits^{\text{iid}}N(0,V)\), with \({\sigma }_{{\rm{g}}}^{2}=0\) for identification57 (Supplementary Note 1). The simpler ‘Free’ model in equation (1) corresponds to assuming that \({V}_{{{cc}}^{{\prime} }}={\sigma }_{{\rm{g}}}^{2}\,+I\{c={c}^{{\prime} }\}{v}_{c}\) for all c and c′, that is, that cell types are independent conditional on the effect that is shared across all cell types. We show transcriptome-wide average results from the Full model in Fig. 3f, but all other main text results use the simpler Free model given the complexity and noise of scRNA-seq data at current sample sizes. Importantly, we demonstrate using theory (Supplementary Note 1.4) and simulations (Extended Data Fig. 3) that the Free model is not biased under the more realistic Full model: \({\sigma }_{{\rm{g}}}^{2}\) targets the average off-diagonal entry in V, and \({\sigma }_{{\rm{g}}}^{2}+\bar{v}\) targets the average diagonal entry.
Fitting CIGMA
We used Haseman–Elston (HE) regression to fit the parameters of CIGMA (Supplementary Note 1). HE regression is a computationally efficient and unbiased method-of-moments approach, making it suitable for aggregating inference across large-scale genomic datasets. Fixed effects were estimated using ordinary least squares.
We test the parameters of CIGMA with a Wald test using jackknife-based precision matrix estimates, as in CTMM57. To test for cell-type-specific genetic effects, we evaluated the null hypothesis that v = 0, that is, that there are no cell-type-specific eQTLs. We used a Wald F-test with C numerator degrees of freedom and N − R denominator degrees of freedom, where C and N are the number of cell types and individuals, and R is the number of parameters in the model (including covariates). We use the same framework to test the null hypothesis of no cell-type-specific residual interindividual effects (w = 0) and to test for shared eQTLs (\({\sigma }_{{\rm{g}}}^{2}=0\)).
... continue reading