Why Cell-Label Uncertainty Matters
A cell-type QTL asks whether genotype is associated with expression in a specified cell type. In single-cell data, however, the cell type is often inferred rather than directly observed. A cell near the boundary between two types may have substantial support for either label. Assigning it to just one type can change the expression profile calculated for its donor, and those donor-level profiles are the outcomes used in a QTL analysis.
The unit of genetic association remains the donor: many cells from one donor do not provide many independent genotype measurements. The question here is how uncertainty in the cells included in a target-type profile affects that donor-level outcome and the resulting QTL estimate. The aim is not to analyze cell abundance, but to make uncertainty in the expression profile for the target type visible and assess its impact on the association.
The label probability is conditional on a classification model and its inputs; it is not a certainty about biological identity. For an expression value \(X_{ij}\) measured on a comparable, normalized scale, one common soft summary for donor \(i\) is the probability-weighted mean:
A cell with a high target-type probability contributes more to this summary than a cell with a low probability. For hard labels \(Z_{ij}\), the corresponding mean is \(\sum_j Z_{ij}X_{ij}/\sum_j Z_{ij}\), when at least one cell is assigned to the type. For count-based pseudobulk analyses, the analogous idea is to weight cell counts by their target-type probabilities before aggregating, then apply the chosen normalization and expression model. The mean formula below is used for clarity in the numerical examples.
What a Weighted Profile Represents
The weighted mean is a useful way to use uncertain assignments without drawing an arbitrary boundary between cells. Its numerator is the sum of each cell’s expression multiplied by its probability of belonging to the target type. Its denominator is the sum of those probabilities, or the expected number of target-type cells under the specified label model. The result is a soft-membership summary, not a claim that the donor has a fractional biological cell.
There is an important distinction between this weighted summary and the exact expectation of a hard-label mean. If the labels \(Z_{ij}\) are uncertain, the hard-label mean is itself a random ratio. In general, the expectation of a ratio is not the ratio of expectations. Thus, weighting by \(q_{ij}\) gives a principled summary, but it does not automatically propagate all uncertainty in the donor profile or in a downstream QTL estimate.
The expression scale also matters. A weighted average of per-cell normalized expression is not generally equivalent to summing raw counts and then normalizing. The aggregation and normalization steps should match the intended outcome and be applied consistently across donors and label analyses.
Worked Example: Calculating a Donor’s Soft Expression Profile
Suppose four cells from one hypothetical donor have normalized expression values of 10, 12, 4, and 8 units for a gene. Their estimated probabilities of belonging to the target type are 0.9, 0.7, 0.2, and 0.4. Calculate the weighted profile and compare it with a hard assignment using a threshold of 0.5.
The probability-weighted numerator is \(0.9(10)+0.7(12)+0.2(4)+0.4(8)=9+8.4+0.8+3.2=21.4\). The sum of the probabilities is \(0.9+0.7+0.2+0.4=2.2\). Thus,
With the stated hard threshold, only the first two cells are assigned to the target type. Their mean expression is \((10+12)/2=11\) units. The two summaries differ because the soft profile gives partial weight to all four cells, whereas the hard profile excludes the last two entirely. Neither value is automatically the uniquely correct biological summary; each follows from a different treatment of the uncertain labels.
QTL Estimation With Uncertain Profiles
Once a profile has been calculated for each donor, a cell-type QTL model relates that donor-level outcome to genotype. For example, for donor \(i\), a linear model can be written as:
Here \(G_i\) is the donor’s genotype dosage, typically coded from 0 to 2, \(\mathbf{C}_i\) contains included donor-level covariates, and \(\varepsilon_i\) is the residual. The coefficient \(\beta_G\) is the expected change in the donor-level expression profile per additional effect allele, conditional on the included covariates and the chosen profile construction. It describes an association, not a causal effect.
For the usual regression-based inference, the model must also be appropriate for the outcome and covariates, donors must provide independent observational units, and the residual assumptions used for the standard errors and tests must be reasonably supported. The genotype is constant across a donor’s cells, so treating those cells as independent genetic observations would not meet the independence requirement. Changing cell labels changes \(Y_i\), and can therefore change both the estimated coefficient and its uncertainty.
Worked Example: Comparing Hard-Label and Soft-Label QTL Slopes
Consider four hypothetical donors with genotype dosages \(G_i=0,1,1,2\). Each donor has two cells: one with target-type probability 1 and expression \(a_i\), and one with uncertain target-type probability \(q_i\) and expression \(b_i\). The values are:
| Donor | \(G_i\) | \(a_i\) | \(q_i\) | \(b_i\) |
|---|---|---|---|---|
| 1 | 0 | 8 | 0.25 | 4 |
| 2 | 1 | 10 | 0.40 | 6 |
| 3 | 1 | 12 | 0.60 | 8 |
| 4 | 2 | 14 | 0.75 | 10 |
For each donor, the soft profile is \((a_i+q_i b_i)/(1+q_i)\). The four profiles are \(8+0.25(4)\) divided by \(1.25=7.2\); \(10+0.40(6)\) divided by \(1.40=8.857\); \(12+0.60(8)\) divided by \(1.60=10.50\); and \(14+0.75(10)\) divided by \(1.75=12.29\) expression units.
For a simple regression on genotype with no other covariates, the slope is \(\sum_i(G_i-\bar{G})(Y_i-\bar{Y})/\sum_i(G_i-\bar{G})^2\). Here \(\bar{G}=1\) and \(\bar{Y}=9.7107\). The numerator is \((-1)(7.2-9.7107)+(1)(12.2857-9.7107)=5.0857\); the two donors with dosage 1 contribute zero. The denominator is \((-1)^2+0^2+0^2+1^2=2\). Therefore the soft-profile slope is \(5.0857/2=2.543\) expression units per allele.
Now use a hard-label threshold of 0.5. The uncertain cell is excluded for donors 1 and 2 and included for donors 3 and 4. The resulting donor profiles are 8, 10, \((12+8)/2=10\), and \((14+10)/2=12\). Their mean is 10. The regression numerator is \((-1)(8-10)+(1)(12-10)=4\), and the denominator remains 2, so the hard-label slope is \(4/2=2.000\) expression units per allele.
In this small illustration, the estimated slope differs by \(2.543-2.000=0.543\) expression units per allele under the two profile definitions. The difference does not establish which estimate is preferable, and four donors are not enough for reliable QTL inference. It demonstrates why the label rule is part of the analysis: it can change the outcome values supplied to the regression.
Propagating Label Uncertainty
A single set of probabilities can be used to construct a soft profile, but a QTL estimate from those profiles does not by itself account for uncertainty in the labels. One direct sensitivity strategy is to draw plausible labels from the classification model, construct a donor-level profile for each draw, and refit the QTL model each time. Each draw uses \(Z_{ij}=1\) with probability \(q_{ij}\) and \(Z_{ij}=0\) otherwise. The resulting distribution of coefficient estimates shows how much the estimated association changes across plausible label assignments.
If uncertainty in the classification model is also relevant, draws should reflect it rather than holding the estimated probabilities fixed as if known. Likewise, if labels are dependent under the classification model, the draws should preserve that dependence rather than sampling each cell independently. A single hard-label analysis can still be reported, but should be accompanied by a clearly specified alternative-label analysis when assignments are materially uncertain.
State the target type, the information used to assign labels, and how \(q_{ij}\) is obtained. Check that probabilities are meaningful for the cells and analysis at hand.
Calculate the primary donor-level outcome using a stated aggregation and normalization rule. Keep the donor, not the cell, as the independent unit in the QTL regression.
Compare the primary analysis with plausible thresholds, alternative classification models, or repeated draws from the label uncertainty model.
Report how the QTL coefficient and its uncertainty change across analyses. A stable result is less sensitive to the tested label choices than a result that changes substantially.
When the label draws are valid multiple imputations for the uncertain labels, uncertainty can be summarized by combining within-draw regression uncertainty with between-draw variation. If there are \(M\) draws, let \(\hat{\beta}_m\) be the QTL coefficient and \(U_m\) its estimated variance in draw \(m\). Define \(\bar{\beta}=M^{-1}\sum_m\hat{\beta}_m\), \(\bar{U}=M^{-1}\sum_m U_m\), and \(B=(M-1)^{-1}\sum_m(\hat{\beta}_m-\bar{\beta})^2\). The combined variance is:
The within-draw term \(\bar{U}\) reflects the regression uncertainty conditional on each set of labels. The between-draw term \(B\) reflects variation in the fitted coefficient across plausible label assignments. This combination is appropriate only when the draws represent the uncertainty being addressed and the imputation procedure’s assumptions are defensible. Otherwise, report the repeated-fit results as a sensitivity analysis rather than presenting the combined variance as a universally valid correction.
Worked Example: Combining Estimates Across Label Draws
Suppose four hypothetical label draws produce QTL slopes of 1.5, 2.0, 2.5, and 3.0 expression units per allele. Suppose each fitted regression has estimated variance \(U_m=0.64\) in squared expression units per allele. The mean slope is \(\bar{\beta}=(1.5+2.0+2.5+3.0)/4=2.25\).
The squared deviations from 2.25 sum to \((-0.75)^2+(-0.25)^2+(0.25)^2+(0.75)^2=1.25\), so the between-draw variance is \(B=1.25/(4-1)=0.4167\). The mean within-draw variance is \(\bar{U}=0.64\). Thus,
Under the stated multiple-imputation conditions, the combined slope is 2.25 expression units per allele with a combined standard error of about 1.077 expression units per allele. This example illustrates the calculation; four draws are too few for a stable assessment of between-draw uncertainty in a real analysis.
Sensitivity Analyses and Interpretation
A useful sensitivity analysis changes one defensible aspect of the label handling at a time. For example, compare a probabilistic profile with hard assignments at two prespecified thresholds, or compare classifiers that use different appropriate marker information. For each analysis, report the number of donors with usable profiles, the profile construction rule, the QTL coefficient with its standard error or interval, and whether the direction and magnitude of the association change. A threshold should not be chosen simply because it yields the smallest p-value.
The information used to classify cells also deserves scrutiny. If a tested gene’s expression contributes directly to its own cell labels, the association can partly reflect the labeling procedure rather than an independent expression pattern. A label model based on suitable independent features, or a sensitivity analysis that changes the relevant classifier inputs, helps reveal this concern. Probabilities should also be checked for plausibility: a model that assigns extreme probabilities to ambiguous cells may understate the practical uncertainty.
Common Mistakes
- Treating probabilities as known truth. A weighted profile uses estimated probabilities, but a regression on that profile alone does not automatically include uncertainty in those probabilities. Draw and refit, or provide another justified uncertainty analysis.
- Assuming a weighted mean equals the expected hard-label mean. The expected weighted numerator is straightforward, but the hard-label denominator is random. A ratio of expected sums is not generally the expectation of their ratio.
- Calling cells independent QTL observations. Cells from the same donor share genotype. Use donor-level profiles or an appropriate model that accounts for donor-level dependence; do not multiply the apparent genetic sample size by the number of cells.
- Interpreting sensitivity as proof of bias or proof of robustness. A changed estimate shows dependence on the tested label choices, not which choice is correct. Similar estimates across a limited set of alternatives do not guarantee robustness to unexamined classification error.
- Confusing label uncertainty with biological variation. Uncertainty about whether a cell belongs to a defined type is a classification issue. It should not be described as a measured biological difference between cell types.
Check Your Understanding
Use the definitions and calculations in this tutorial to answer the following questions.
- A cell has target-type probability 0.3 and expression of 15 units. What contribution does it make to the weighted numerator, and why is that not the same as assigning the cell to the target type?
- Explain why a probability-weighted donor mean is not generally the exact expectation of the hard-label donor mean.
- In a donor-level QTL regression, what does the genotype coefficient measure, and what are its expression and genotype units?
- Why can a regression on one set of weighted profiles fail to represent all uncertainty in the labels?
- What is the purpose of refitting a QTL model across plausible label draws, and what should be reported when the estimates vary?
- Why should cells from one donor not be treated as independent genotype observations?