Why Quality Control Is Part of QTL Inference
A cell-type QTL analysis can use an appropriate donor-level model and still produce a misleading association if the genotype is assigned to the wrong donor, genotypes are unevenly distributed across technical batches, or the retained data depend on genotype. Quality control is therefore not merely a preliminary step for removing inconvenient observations. It checks whether the data and design support the genetic effect being estimated.
The experimental unit for a genetic association is the donor. For a given gene and cell type, let \(Y_i\) denote donor \(i\)'s pseudobulk expression, \(G_i\) the donor's genotype dosage for the tested variant, and \(C_i\) a vector of covariates. A typical continuous-outcome model is
Here \(G_i\) is usually coded as 0, 1, or 2 copies of the effect allele, and \(\beta_G\) is the conditional change in mean expression per additional effect allele, in the scale used for \(Y_i\). The model assumes that the genotype and covariates are correctly recorded, that the mean is adequately represented by the specified terms, and that residuals from different donors are independent with mean zero conditional on the predictors. Standard errors also require an appropriate variance model. Cells from one donor do not become independent genetic replicates by being numerous; treating them as such would be pseudoreplication.
Quality checks ask whether the donor-level rows are trustworthy, whether the genotype effect is identifiable apart from technical effects, and whether inclusion in the analysis has created a selected sample. Covariate adjustment can address some measured technical variation, but it cannot fix every failure in these conditions.
Four Quality-Control Questions
Is the donor identity correct? The genotype used in the regression must belong to the donor whose cells contributed to that pseudobulk profile. Compare sample labels and processing records, and where possible compare independent genotype fingerprints from DNA data with identity markers observed in the single-cell material. Check for unexpected duplicate profiles, swaps, contamination, or mixtures. A mismatch must be resolved or the affected sample excluded; adding a “suspected swap” covariate does not make its genotype correct.
Does genotype overlap across batch? Tabulate genotype dosage by library preparation batch, sequencing run, site, and other major technical factors. A model can adjust for batch only when the data contain enough within-batch genotype variation to distinguish the genotype effect from the batch effect. If every donor of one genotype is in one batch and every donor of another genotype is in a different batch, their effects are not separately identifiable.
Could depth be driving the signal? Sequencing depth affects the number of observed reads and the precision with which expression is measured. Inspect library size, cells per donor and cell type, and relevant quality metrics by genotype and batch. For count outcomes, a library-size offset is commonly used when the mean count is proportional to exposure; for normalized continuous pseudobulk outcomes, a suitable normalization is usually applied first. A depth covariate may be useful if residual technical dependence remains, but blindly adjusting for several redundant depth summaries can make estimates unstable or change the estimand.
Does filtering depend on genotype? Report how many donors and cells are removed at each quality-control step, stratified by genotype dosage and important design factors. Also examine whether the tested gene is detected or retained at different rates by genotype. A genotype-associated retention pattern may reflect batch imbalance, ancestry differences, or a biological relationship, but whatever its cause, analyzing only retained observations can distort the association. A covariate in the final regression does not restore observations that were excluded.
Choosing Covariates With a Clear Purpose
Covariates should represent plausible sources of technical or population structure that could otherwise be associated with both genotype and measured expression. Depending on the study design and the outcome model, these may include batch, sequencing run, sex, age, ancestry principal components, or a carefully chosen measure of technical quality. The relevant question is not whether a variable is available, but whether its inclusion addresses a defined source of bias or improves precision without undermining the target comparison.
For genotype testing, ancestry covariates are often important because allele frequencies and gene expression can both vary across ancestry groups. Batch terms address technical mean differences only when batch and genotype are not inseparable. Depth treatment should match the outcome: use a suitable exposure offset for counts, or normalization and justified residual technical adjustment for a continuous pseudobulk measure. Do not use cell number as a proxy for within-cell expression when the question concerns expression within a cell type; cell abundance and within-cell expression are distinct quantities.
Avoid automatic adjustment for variables measured after or potentially affected by the genotype or the expression process. Such adjustment can remove part of a real association or introduce selection-related distortion. Filtering and covariate choices should be specified with the scientific target in mind, and sensitivity analyses should compare defensible alternatives rather than search for the model with the smallest p-value.
Worked Example: Checking Donor-to-Genotype Assignment
A hypothetical study has a single-cell profile labeled D03 and an independent DNA genotype record for donor D03. Investigators compare high-quality identity SNPs between the profile and each candidate donor record. Of 100 SNPs with reliable calls, the profile agrees with D03 at 72 SNPs and with D07 at 98 SNPs.
The concordance proportion for the labeled donor is \(72/100=0.720\), while the proportion for D07 is \(98/100=0.980\). The large discrepancy is a strong identity warning: the profile labeled D03 may belong to D07, or there may be contamination or another data-handling problem. The arithmetic does not by itself establish which explanation is correct. Investigators should check sample records and identity quality, then correct a confirmed label error or exclude an unresolved profile before testing QTLs.
If the profile is wrongly paired with D03's genotype, the regression does not merely gain random noise. It assigns an outcome to the wrong genetic predictor, which can attenuate, distort, or otherwise alter the estimated genetic association. No ordinary batch or depth covariate repairs that pairing error.
Worked Example: Recognizing Non-Identifiable Batch Confounding
Suppose a hypothetical study has eight donors. Four have genotype dosage \(G_i=0\) and were processed in batch A; four have \(G_i=2\) and were processed in batch B. The average pseudobulk expression is 5 units in batch A and 8 units in batch B.
A model with a batch indicator \(B_i\), coded 0 for A and 1 for B, is \(Y_i=\beta_0+\beta_GG_i+\gamma B_i+\varepsilon_i\). In these data, \(G_i=2B_i\) for every donor. Therefore the genotype and batch columns of the design matrix are exact multiples. The observed difference in means is \(8-5=3\) expression units, and the model can represent it as \(2\beta_G+\gamma=3\). Many pairs \((\beta_G,\gamma)\) satisfy this equation; for example, \((0,3)\) and \((1.5,0)\) both do.
Thus the observed contrast cannot establish whether expression differs by genotype, by batch, or by both. Including batch in the regression does not solve the problem: the separate coefficients are not identifiable. A study with genotype overlap within batches could estimate the contrast more credibly; for this hypothetical design, the limitation must be reported rather than hidden by a fitted coefficient.
Why Omitted Batch Can Bias the Genotype Slope
The confounding problem also appears when genotype and batch are not perfectly aligned but are associated. Consider a simplified model with one batch indicator:
If batch is omitted and \(Y_i\) is regressed on \(G_i\) alone, the expected slope under the model's mean-zero error assumption is
To obtain this expression, take the covariance of both sides of the model with \(G_i\). The constant has zero covariance with \(G_i\); the genotype term contributes \(\beta_G\operatorname{Var}(G)\); and the batch term contributes \(\gamma\operatorname{Cov}(G,B)\). If the error has zero conditional mean, its covariance with genotype is zero. Dividing by \(\operatorname{Var}(G)\) gives the displayed result. The second term is omitted-variable bias: it vanishes if batch has no expression effect or if batch and genotype are uncorrelated. It is not generally eliminated by collecting more cells from the same donors.
Worked Example: Interpreting Depth and Genotype-Associated Filtering
In a hypothetical cell-type QTL study, two donors have genotype dosage 0 and 2. The first has 120 reads assigned to a gene from a library of 1,000,000 reads; the second has 240 reads from a library of 2,000,000 reads. Their counts differ, but compare counts per million (CPM):
The raw count is twice as large in the second donor, but the gene's relative count per million is the same. This illustrates why raw pseudobulk counts should not be compared without accounting for library size. CPM is only a simple illustration, not a universal normalization method; a count model with a suitable library-size offset or an appropriate normalization method is needed for actual inference.
Now suppose a separate filtering rule retains donors only if at least 50 cells of the target type pass quality control. Of six hypothetical dosage-0 donors, five pass; of six dosage-2 donors, two pass. The retention proportions are \(5/6=0.833\) and \(2/6=0.333\), respectively. This imbalance warrants investigation of batch, cell yield, and quality metrics by genotype. It does not prove that genotype caused the loss, but it shows that the analyzed donor set differs by genotype. The appropriate response is to trace the source of the imbalance, report exclusions, and assess whether conclusions are sensitive to defensible filtering choices—not to assume a regression adjustment makes the selection harmless.
A Practical Diagnostic Sequence
Confirm that each pseudobulk profile is paired with the correct genotype record, resolving suspicious fingerprints before association testing.
Tabulate genotype by batch, site, and other major technical factors. Identify absent overlap or sparse genotype groups that may make estimates unstable or non-identifiable.
Summarize library size, cell counts, and each filtering decision by genotype and batch; distinguish technical exposure from cell-type abundance and expression.
Choose covariates and depth handling to match the outcome and design. Compare a small set of scientifically defensible specifications and describe any material changes.
Common Mistakes and Key Takeaway
- Assuming batch adjustment always removes confounding. If genotype and batch have no overlap, separate effects are not identified. A software coefficient is not evidence that the design contains the needed comparison.
- Treating a donor mismatch as ordinary noise. A wrong genotype-to-profile assignment is a data-integrity problem; investigate and resolve it before modeling.
- Interpreting more reads as higher expression. Raw counts depend on library size. Use a suitable offset or normalization and state the expression scale being modeled.
- Checking filtering only in aggregate. Overall retention can look acceptable while retention differs sharply across genotype or batch. Report the denominators and rates in relevant groups.
- Adding every quality metric as a covariate. Redundant or downstream variables can destabilize estimates or alter the target association. Include covariates for a clear, defensible reason.
Check Your Understanding
Answer each question by identifying the diagnostic evidence and its implication for inference.
- Why does a donor-level genotype association not gain independent genetic sample size from sequencing thousands of cells per donor?
- If all dosage-0 donors are in batch A and all dosage-2 donors are in batch B, what can and cannot be learned from a model containing both genotype and batch?
- A gene has twice as many raw reads in one donor, whose library also has twice the total reads. What normalization check would help interpret this difference?
- What does a large difference in donor retention rates across genotype groups signal, and why does including genotype as a covariate not automatically resolve it?
- Give one reason to include a covariate in a cell-type QTL model and one reason not to add a measured variable automatically.