Tutorials › Statistical Genetics › Genotype-by-Cell-Type Interaction Models

Single-Cell and Cell-Type Genetics · Tutorial 956 of 989

Genotype-by-Cell-Type Interaction Models

Learn how genotype-by-cell-type terms encode cell-specific genetic effects and how a joint model can test whether those effects are uniform across cell types.

Advanced 10 min read

What You'll Learn

  • Write a joint model with genotype dosage, cell-type indicators, and genotype-by-cell-type interaction terms
  • Interpret the reference-cell genetic coefficient and interaction coefficients on the model’s link scale
  • Translate log-link coefficients into cell-specific rate ratios
  • State assumptions needed to interpret a global test of genotype-by-cell-type interaction
  • Distinguish evidence for heterogeneity across cell types from evidence identifying a particular pair of differing effects

Why Model Genotype and Cell Type Jointly?

A genetic association estimated in one cell type need not have the same size, or even the same direction, in another. An analysis that fits a separate model for each cell type can describe each association, but a joint model gives a direct way to represent and test whether the genetic effect varies across cell types. Its central ingredient is an interaction: a genotype-by-cell-type term that allows the genotype coefficient to change with cell type.

The model is an association model, not by itself a demonstration that genotype causes an expression change. Its interpretation also depends on the chosen outcome scale and link. For cell-type pseudobulk counts, a log-link model makes the genotype coefficient a change in log expected count per allele, conditional on the model covariates and offset.

Joint Model and Reference-Cell Coding

Definition: Let \(Y_{ik}\) be the expression outcome for donor \(i\) in cell type \(k\), and let \(G_i\) be that donor’s genotype dosage, coded \(0\), \(1\), or \(2\) copies of the effect allele. Choose cell type 1 as the reference. For each other cell type \(k=2,\ldots,K\), let \(D_{ik}=1\) if the observation is from cell type \(k\), and \(D_{ik}=0\) otherwise. A joint model with genotype-by-cell-type interaction is

\(g\{E(Y_{ik}\mid G_i,D_{ik},\mathbf{Z}_i)\}=\eta_{ik}\), where

\( \eta_{ik}=o_{ik}+\beta_0+\beta_G G_i+\sum_{k=2}^{K}\gamma_kD_{ik}+\sum_{k=2}^{K}\delta_kG_iD_{ik}+\mathbf{Z}_i^\mathsf{T}\boldsymbol{\theta}. \)

Here \(g\) is the link function, \(o_{ik}\) is a specified offset (zero when none is needed), and \(\mathbf{Z}_i\) contains adjustment covariates. The \(\gamma_k\) terms allow baseline levels to differ by cell type; the \(\delta_k\) terms allow the genotype effect to differ from that in the reference type.

For a count outcome, a common specification is a Poisson or negative-binomial mean model with log link and a library-size offset. For example, if \(L_{ik}\) is the effective library size, \(o_{ik}=\log L_{ik}\). The offset adjusts the expected count for exposure or sequencing depth; it is not an estimated genotype effect. The count distribution and variance assumptions must be appropriate for the data. A negative-binomial model can accommodate variance exceeding the mean, but does not automatically account for dependence between observations from the same donor.

With reference-cell coding, the genotype slope on the link scale is \(\beta_G\) in cell type 1 and \(\beta_G+\delta_k\) in cell type \(k\). Thus the interaction coefficient is a difference in slopes, not the slope for that cell type by itself. The model without genotype-by-cell-type interaction sets every \(\delta_k\) to zero and assumes a common genotype slope on the chosen link scale.

Interpreting the Model on a Log Scale

For a log link, the slope is a log ratio of expected outcomes per additional effect allele, with other modeled quantities held fixed. In cell type 1, the expected-count ratio for a one-allele increase is \(\exp(\beta_G)\). In cell type \(k\), it is \(\exp(\beta_G+\delta_k)\). The ratio of those two cell-specific ratios is \(\exp(\delta_k)\). This makes the interaction a comparison of genetic associations on the multiplicative mean scale.

A cell-type main-effect coefficient \(\gamma_k\) is also conditional on the model: at genotype dosage zero and fixed covariates and offset, it compares the expected outcome in cell type \(k\) with that in the reference. It does not describe the genotype effect. If the link were identity rather than log, the coefficients would instead describe differences in expected outcome on the original outcome scale.

Worked Example: Two Cell Types and a Log-Link Count Model

Suppose a hypothetical negative-binomial pseudobulk analysis uses cell type A as the reference and cell type B as the comparison. At fixed covariates and offset, the fitted coefficients are \(\hat{\beta}_G=0.20\) and \(\hat{\delta}_B=-0.35\). The fitted genotype slope in A is \(0.20\) on the log-mean scale. In B, it is

$$ \hat{\beta}_G+\hat{\delta}_B=0.20-0.35=-0.15. $$

The corresponding expected-count ratios per additional effect allele are

$$ \exp(0.20)\approx1.221,\qquad \exp(-0.15)\approx0.8607. $$

Under this fitted model, one additional effect allele is associated with an expected count about 1.221 times as large in A and 0.8607 times as large in B, at the same offset and covariate values. Equivalently, the ratio of the two cell-specific per-allele ratios is

$$ \exp(\hat{\delta}_B)=\exp(-0.35)\approx0.7047. $$

The negative interaction estimate means that the per-allele association is smaller on the log scale in B than in A. These are fitted associations, not evidence that changing genotype would cause the count to change.

Assumptions and the Global Interaction Test

The interaction test compares a model that permits cell-specific genotype slopes with a nested model that constrains those slopes to be equal. In the reference coding above, the global null is \(H_0:\delta_2=\cdots=\delta_K=0\); the alternative is that at least one interaction coefficient is nonzero. This is a test of heterogeneity in the modeled association, on the scale determined by the link function.

A likelihood-ratio test is appropriate when the full and reduced models are fitted to the same observations, the reduced model is nested in the full model, and the likelihood and regularity assumptions support the usual large-sample approximation. If the full model adds \(K-1\) interaction coefficients, the test statistic is compared with a chi-square distribution with \(df=K-1\), under the null. A Wald test of the same joint restriction is another possibility when its approximation is adequate. In either case, donor-level dependence must be handled in the standard errors or likelihood model; treating many cells from one donor as independent replicates can make inference anti-conservative.

The mean-model assumptions matter as well: genotype dosage is treated as a linear predictor, the chosen link and covariate adjustment must be suitable, cell-type labels and outcomes must be defined consistently, and the offset must represent the intended exposure. In a log-link count model, “equal genetic effects” means equal log mean ratios per allele, not equal absolute changes in counts. The test can indicate that effects are not uniform, but does not alone say which cell types differ or establish a biological mechanism.

Worked Example: Testing the Global Interaction in Three Cell Types

Consider a hypothetical analysis of three cell types, with the same donors, outcomes, covariates, and offsets used for each fit. The reduced model has a common genotype slope; the full model adds the two interactions for cell types B and C. Suppose their maximized log likelihoods are \(-516.1\) and \(-512.4\), respectively. The likelihood-ratio statistic is

$$ 2\{\ell_{\mathrm{full}}-\ell_{\mathrm{reduced}}\} =2\{-512.4-(-516.1)\} =2(3.7)=7.4. $$

There are \(K-1=2\) added interaction coefficients, so under the global null the reference distribution is chi-square with \(df=2\). For this distribution, the upper-tail probability at 7.4 is approximately \(\exp(-7.4/2)=\exp(-3.7)=0.0247\). At a prespecified significance level of \(\alpha=0.05\), this result provides evidence against a common genotype slope across the three cell types, provided the model and dependence assumptions are adequate.

The global result does not identify which pair of cell types has different effects. Nor does it mean that every cell type has a nonzero genetic association. It says that the set of cell-specific slopes is not adequately represented by one shared slope on the model’s link scale.

A Short Derivation of the Cell-Specific Effects

The interaction interpretation follows by substituting the indicator values into the linear predictor. For the reference type, every non-reference indicator equals zero. For type \(k\), its indicator equals one and the other type indicators equal zero. Holding genotype and covariates fixed, the resulting predictors are

$$ \eta_{i1}=o_{i1}+\beta_0+\beta_GG_i+\mathbf{Z}_i^\mathsf{T}\boldsymbol{\theta}, \qquad \eta_{ik}=o_{ik}+\beta_0+\gamma_k+(\beta_G+\delta_k)G_i+ \mathbf{Z}_i^\mathsf{T}\boldsymbol{\theta}. $$

Consequently, increasing dosage by one changes the reference predictor by \(\beta_G\), and the type-\(k\) predictor by \(\beta_G+\delta_k\). Under a log link, exponentiating each predictor gives the corresponding expected mean. Taking the ratio of means for dosage \(G_i+1\) and \(G_i\) cancels the terms that do not depend on dosage, leaving \(\exp(\beta_G)\) for the reference and \(\exp(\beta_G+\delta_k)\) for type \(k\). Dividing these ratios gives \(\exp(\delta_k)\). This establishes why an interaction coefficient is a difference in log-scale genetic effects and, after exponentiation, a ratio of per-allele mean ratios.

Worked Example: Three Cell Types and Cell-Specific Ratios

In a hypothetical log-link model, let A be the reference cell type and suppose \(\hat{\beta}_G=0.10\), \(\hat{\delta}_B=0.25\), and \(\hat{\delta}_C=-0.40\). The three fitted slopes are

$$ \text{A}: 0.10,\qquad \text{B}: 0.10+0.25=0.35,\qquad \text{C}: 0.10-0.40=-0.30. $$

Exponentiating gives the fitted per-allele expected-count ratios:

$$ \text{A}: \exp(0.10)\approx1.105,\qquad \text{B}: \exp(0.35)\approx1.419,\qquad \text{C}: \exp(-0.30)\approx0.7408. $$

At fixed offset and covariates, these estimates correspond to about a 10.5% higher expected count per allele in A, about a 41.9% higher expected count per allele in B, and about a 25.9% lower expected count per allele in C. The B-versus-A interaction ratio is \(\exp(0.25)\approx1.284\): B’s fitted per-allele ratio is about 1.284 times A’s. The C-versus-A interaction ratio is \(\exp(-0.40)\approx0.6703\). These point estimates describe the model’s pattern; uncertainty and a formal test are needed before drawing inferential conclusions about heterogeneity.

Modeling Choices and Common Pitfalls

A joint model uses the same genotype coding and a clearly specified cell-type reference, making the meaning of every coefficient explicit. Changing the reference cell type changes the coefficient labels and values, but not the fitted cell-specific effects or the global hypothesis that all slopes are equal. Results should therefore report the cell-specific effects or state the reference coding, rather than presenting interaction coefficients without context.

  • Omitting the cell-type main effects. A model with interactions but no cell-type indicators can force baseline differences into an inappropriate structure. Include the lower-order terms that define the interaction.
  • Calling an interaction coefficient the cell-specific slope. With reference coding, \(\delta_k\) is the difference from the reference slope. The slope in type \(k\) is \(\beta_G+\delta_k\).
  • Confusing a main effect with an interaction. \(\gamma_k\) compares baseline levels at genotype zero; it does not test whether genotype effects vary by cell type.
  • Ignoring the outcome scale. In a log-link model, interaction concerns differences in log ratios (or ratios of mean ratios), not differences in absolute count changes.
  • Treating cells as independent genetic replicates. Genotype is generally measured at the donor level, and cells from one donor are dependent. The analysis must respect the experimental unit and within-donor dependence.

For example, “the genotype coefficient is significant in A but not significant in B” is not itself evidence that the genetic effects differ. The separate significance decisions do not test the difference between slopes. The joint interaction test instead evaluates whether the model can support a common slope across cell types; follow-up comparisons are needed to localize the differences.

Key takeaway: In a reference-coded joint model, the genotype coefficient is the genetic effect in the reference cell type, and each genotype-by-cell-type coefficient is the difference from that reference effect on the link scale. The global interaction test asks whether all such differences can be set to zero.

Check Your Understanding

Use the model definition and interpretations above to answer the following questions.

  1. With cell type A as reference, what is the genotype slope in cell type C if \(\beta_G=-0.08\) and \(\delta_C=0.30\)?
  2. In a log-link model, what multiplicative comparison is represented by \(\exp(\delta_B)\)?
  3. For four cell types, how many interaction coefficients are tested by the global null that the genotype slopes are equal?
  4. Why does a significant global interaction test not establish which particular pair of cell types differs?
  5. Why is “significant in one cell type but not significant in another” insufficient to conclude that the effects differ?
Clinical Biostats