Why Conditioning on a Cell State Can Mislead
A cell-type QTL analysis asks whether genetic variation is associated with gene expression in a defined cellular context. That context may be a broad cell type, or it may be a more specific state, such as an activated, stressed, or cycling state within a cell type. Restricting an analysis to cells in a particular state can be scientifically useful, but it changes which cells contribute to the comparison. If genotype and other causes of expression both influence entry into that state, the restriction can create an association between genotype and those other causes.
This is collider bias. It is not evidence that the genotype affects expression. Rather, conditioning on a shared consequence of genotype and another expression-related factor can make the genotype and that factor statistically associated within the selected cells. The induced association can then appear as a genotype–expression association.
The Causal Diagram and Its Interpretation
Let \(G\) denote a genetic variant, \(S\) a cell state, \(U\) another cause of that state, and \(Y\) expression of a gene. The relevant diagram is:
The two arrows into \(S\) make state a collider. Before conditioning on \(S\), the path from \(G\) to \(Y\) through \(S\) is blocked at the collider. If \(G\) and \(U\) are otherwise independent after accounting for relevant population structure and other design factors, this diagram does not contain an open path associating \(G\) with \(Y\). Restricting the analysis to cells with \(S=1\), however, opens the path \(G \rightarrow S \leftarrow U \rightarrow Y\).
The mechanism can be understood informally: among cells selected to be in the state, a genotype that makes entry into the state more likely can be accompanied by a lower prevalence of another cause that also makes entry likely. If that other cause changes expression, the genotype will appear associated with expression in the selected group, even when it has no direct effect on expression.
The variables need not be measured at the same level. Genotype is typically donor-level, while state and expression may be cell-level. For example, a donor’s genotype may influence the probability that a cell enters an activation state; a donor-level exposure or a cell-level signaling input may also influence activation and expression. The causal question concerns how selection into the analyzed state changes the composition of the observations, not simply the level at which each variable was recorded.
Worked Example: Reading a State-Selection Diagram
Suppose a variant is associated with the probability that immune cells enter an activated state. An inflammatory signal also increases activation and raises expression of gene \(Y\). Assume initially that the variant has no effect on \(Y\) except possibly through changing activation, and that the inflammatory signal is not associated with genotype before selecting cells. What can happen when the analysis includes only activated cells?
Step 1: Draw the causes. Write \(G \rightarrow S \leftarrow U \rightarrow Y\), where \(G\) is genotype, \(S\) is activation state, and \(U\) is the inflammatory signal.
Step 2: Identify the selection. An analysis limited to activated cells conditions on \(S=1\). This opens the path from \(G\) through \(S\) to \(U\), and then to \(Y\).
Step 3: State the implication. Within activated cells, genotype can become associated with the inflammatory signal. Since the signal affects expression, genotype can also become associated with \(Y\). That association need not represent a direct genetic effect on expression. This conclusion is about possible bias under the stated diagram; it does not establish that any particular observed association is biased.
A Numerical Demonstration
The following hypothetical calculation makes the induced association explicit. Let \(G\) and \(U\) each be binary, with values 0 and 1, and assume they are independent in the population: each of the four \((G,U)\) combinations has probability \(0.25\). Let \(S=1\) indicate that a cell is included in the analyzed state. Suppose the probabilities of being in that state are as follows.
| Genotype \(G\) | Other cause \(U\) | \(P(S=1\mid G,U)\) |
|---|---|---|
| 0 | 0 | 0.10 |
| 1 | 0 | 0.60 |
| 0 | 1 | 0.60 |
| 1 | 1 | 0.90 |
Both \(G\) and \(U\) increase the probability of the state. Let expression follow \(Y=2+3U+\varepsilon\), where \(\varepsilon\) has conditional mean zero and is independent of \(G\), \(U\), and selection. In this model, changing \(G\) while holding \(U\) fixed does not change expected expression. The value of \(U\), however, changes expected expression by 3 units.
Among selected cells with \(G=1\), the relative selection weights for \(U=0\) and \(U=1\) are \(0.60\) and \(0.90\). Since the population probabilities of the two \(U\) values are equal, they cancel in the conditional probability:
For selected cells with \(G=0\), the corresponding weights are \(0.10\) and \(0.60\), so:
Thus, within the selected state, \(U=1\) is less common among cells with \(G=1\) than among cells with \(G=0\). Expected expression in each genotype group is obtained from the expression model:
The selected-sample contrast, defined as the mean for \(G=1\) minus the mean for \(G=0\), is \(3.80-4.571\approx -0.7714\) expression units. Yet the model contains no direct effect of \(G\) on \(Y\). The contrast arises because conditioning on \(S=1\) makes \(G\) and \(U\) associated, and \(U\) affects \(Y\).
Why the Induced Association Appears
The key calculation is a conditional probability. For binary \(U\), if \(P(U=1)=P(U=0)\) and \(G\) is independent of \(U\), then within genotype group \(g\):
The expression follows from Bayes’ rule: the numerator is proportional to the probability of \(U=1\) and selection, and the denominator sums that quantity over both possible values of \(U\). In the numerical example, the probabilities of \(U=0\) and \(U=1\) before selection are equal, so those common factors cancel. The resulting conditional prevalence depends on genotype whenever the state-selection probabilities differ across the \(G,U\) combinations.
More generally, suppose \(E[Y\mid G,U,S=1]=\mu+\tau G+\gamma U\), with a mean-zero residual in the selected group. The genotype contrast among selected observations is:
The first term, \(\tau\), is the model’s conditional genetic effect at a fixed value of \(U\). The second term is the contribution of the selection-induced difference in \(U\). If \(\tau=0\), the selected-group contrast can still be nonzero whenever \(\gamma\ne 0\) and the two conditional prevalences differ. In the numerical example, the prevalence difference is \(0.60-6/7=-9/35\), so the induced contrast is \(3(-9/35)=-27/35\approx -0.7714\) units.
Worked Example: A Direct Check of the Induced Contrast
Use the hypothetical selection probabilities above, with expression \(Y=2+3U+\varepsilon\), and assume the residual has conditional mean zero. Calculate the selected-sample contrast using the general expression.
There is no direct genotype term in the expression model, so \(\tau=0\), and the expression difference associated with \(U\) is \(\gamma=3\) units. The selected prevalences are \(P(U=1\mid G=1,S=1)=0.60=3/5\) and \(P(U=1\mid G=0,S=1)=6/7\). Therefore:
This agrees with the difference between the selected-group means, \(3.80-4.571\approx-0.7714\). The arithmetic confirms that the apparent association is entirely due to the changed distribution of \(U\) in the selected genotype groups under this model.
Distinguishing Collider Bias From Mediation
Not every association involving a cell state is collider bias. If genotype affects state and state in turn affects expression, the diagram includes \(G \rightarrow S \rightarrow Y\). In that case, state lies on a causal pathway from genotype to expression, and restricting or adjusting for state may change the genetic effect being estimated. This is different from the collider path \(G \rightarrow S \leftarrow U \rightarrow Y\), although both structures can exist at once.
The scientific question matters. An analysis of expression among cells observed in a state estimates an association for that selected group. It does not automatically estimate the effect of genotype on expression in all cells, nor does it isolate a direct genetic effect. Interpret the result in relation to the selection rule and the causal paths that could influence both state membership and expression.
Worked Example: Assessing a Measured Alternative Cause
Suppose \(U\), the activation signal in the numerical example, is measured. Within selected cells, the expected expression values at fixed \(U\) are \(2\) units when \(U=0\) and \(5\) units when \(U=1\), for either genotype. What does comparing genotype groups within \(U\) strata show under the stated model?
For \(U=0\), the model gives \(E[Y\mid G=1,U=0,S=1]=2\) and \(E[Y\mid G=0,U=0,S=1]=2\). The within-stratum difference is \(2-2=0\) units.
For \(U=1\), the model gives \(E[Y\mid G=1,U=1,S=1]=5\) and \(E[Y\mid G=0,U=1,S=1]=5\). This within-stratum difference is also \(5-5=0\) units.
Thus, in this constructed example, accounting for \(U\) removes the apparent genotype contrast because the model has no genotype effect at fixed \(U\). This is a consequence of the assumed diagram and model, not a universal guarantee: relevant causes may be unmeasured, the model may be misspecified, or there may be little overlap in genotype groups within state and covariate strata.
Practical Implications for Cell-Type QTLs
A cell-state restriction may be appropriate when the target is explicitly expression among cells in that state. The important point is to recognize that this target is conditional on state membership and may be vulnerable to collider bias. A state label is not a neutral filter if genotype, donor characteristics, environmental exposures, cell viability, or technical capture processes affect which cells receive that label or are observed.
A causal diagram helps make the assumptions visible. Before interpreting a state-specific association, ask whether genotype could affect state membership, whether another cause of state also affects expression, and whether the analysis selects or adjusts on state. Also consider whether population structure or other factors already associate genotype with those causes; such associations can create additional paths and are distinct from the collider mechanism described here.
If a plausible alternative cause is measured, modeling or stratifying on it may help assess whether it explains the induced association, as in the worked example. This is not a universal repair: adjustment choices depend on the causal structure and on the estimand. In particular, conditioning on additional variables can introduce other biases or change the question being answered. Reporting the state definition, the selection rule, and the causal interpretation of the estimated association makes these limitations easier to evaluate.
Common Mistake
Incorrect reasoning: “Genotype is fixed before the cell state, so selecting cells by state cannot bias a genotype–expression association.” The timing of genotype does not prevent selection bias. If genotype influences state membership and another cause of expression also influences state membership, conditioning on that shared consequence can associate genotype with the other cause.
Correction: Draw the relevant arrows and identify what the analysis conditions on. Under \(G \rightarrow S \leftarrow U \rightarrow Y\), conditioning on \(S\) opens a noncausal path from \(G\) to \(Y\), even when \(G\) and \(U\) were independent before selection and genotype has no direct effect on expression. The diagram establishes a possible mechanism, not proof that a particular result is biased.
Check Your Understanding
Use causal paths and conditional comparisons to answer these questions.
- In the diagram \(G \rightarrow S \leftarrow U \rightarrow Y\), which variable is the collider, and what changes when an analysis conditions on \(S\)?
- In the numerical example, why does the proportion with \(U=1\) differ by genotype among selected cells even though \(G\) and \(U\) are independent before selection?
- If \(U\) raises expression but genotype does not directly affect expression, explain how a genotype–expression association can appear within \(S=1\).
- How does the interpretation differ between the path \(G \rightarrow S \leftarrow U \rightarrow Y\) and the path \(G \rightarrow S \rightarrow Y\)?
- Why does a causal diagram that permits collider bias not, by itself, prove that an observed cell-type QTL is spurious?