Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Selecting Genes for Velocity Inference

RNA Velocity · Tutorial 398 of 700

Selecting Genes for Velocity Inference

Develop a defensible, dataset-aware gene-selection strategy that distinguishes measurable genes from genes whose cell-to-cell patterns can support velocity inference.

Advanced 11 min read

What You'll Learn

  • Define expression, detection frequency, and dynamic-range criteria for candidate velocity genes.
  • Explain why variation across cells helps identify a gene’s kinetic relationship.
  • Evaluate whether spliced and unspliced measurements provide enough information for fitting.
  • Use kinetic-fit results as evidence for inclusion without treating one fit statistic as decisive.
  • Compare gene-selection strategies and recognize the limitations of fixed thresholds.
  • Apply a transparent screening sequence to hypothetical single-cell data.

Why Gene Selection Matters

A gene can be biologically important and still provide little information for estimating RNA velocity. If its spliced and unspliced counts are nearly always zero, or show almost no variation across the cells being studied, the data may not reveal a useful kinetic pattern. Conversely, a gene with abundant counts is not automatically suitable: its measurements must also support a sufficiently identifiable and adequately fitting kinetic relationship.

Gene selection is therefore an evidence-based screening decision, not a universal list of genes or a single expression cutoff. The goal is to retain genes with enough paired spliced and unspliced information, variation across cells, and support from the selected kinetic model. The right criteria depend partly on the experiment, the cells sampled, and the model being fitted. A gene-selection result should be described as a set of genes that are informative under those conditions, not as a definitive ranking of biological importance.

Definition: For gene \(g\) and cell \(i\), let \(u_{ig}\) denote the measured unspliced count and \(s_{ig}\) the measured spliced count. The detection frequency for a species is the proportion of cells with a positive measured count; for example, \(q_{u,g}=\#\{i:u_{ig}>0\}/n\). Expression level summarizes the amount measured across cells, while dynamic range summarizes how much those measurements vary across cells. A gene is informative for velocity inference when its measurements provide sufficient evidence to estimate and interpret its kinetic behavior under the chosen model.

These summaries answer different questions. A mean count describes overall abundance but can conceal whether that abundance comes from a few cells or modest counts in many cells. Detection frequency reveals how broadly the species is observed, but not whether positive counts vary enough to distinguish kinetic states. Dynamic range describes that variation, but a wide range driven by a few extreme observations may not represent a stable pattern. Selection should consider the measures together.

What Makes a Gene Informative?

The two-compartment kinetic model distinguishes unspliced and spliced RNA and describes changes in their amounts through transcription, splicing, and degradation. Velocity estimation uses the observed patterns to infer a rate of change under a kinetic model. Accordingly, a candidate gene needs usable observations of both species and enough variation across the sampled cells to constrain the relevant relationship. Expression and detection are necessary evidence about measurement availability; neither alone establishes that the kinetic model is informative or appropriate.

A practical screen can summarize, for each gene, the mean of \(u_{ig}\) and \(s_{ig}\), their detection frequencies, and a measure of variation such as the variance or an interquantile range. It is often helpful to distinguish the mean over all cells, including zeros, from the mean among detected cells. The first reflects both prevalence and abundance; the second describes positive measurements but does not show how widely the species is detected. No one summary captures all of these features.

For example, a gene detected in almost every cell but with nearly constant counts may have limited leverage for estimating how kinetic state changes. A gene detected in only a handful of cells may have a striking range among those detections, yet too little support across the cell population for a stable fit. A gene with adequate counts in both species and a broad, well-supported range is a stronger candidate, provided its kinetic fit is also credible.

Selection principle: Retain genes when evidence supports all three links in the analysis: the relevant RNA species are measured in enough cells, their values vary enough to constrain kinetic behavior, and the chosen model gives a usable fit. Treat each link as a separate check; passing one does not guarantee passing the others.

Why Variation Helps: A Short Justification

The role of variation can be seen in a simple regression approximation to a phase-portrait relationship. Suppose, for this justification only, that one measured response \(y_i\) is related linearly to a fixed predictor \(x_i\) by \(y_i=a+bx_i+\epsilon_i\). Assume the errors are independent, have mean zero, and have common variance \(\sigma^2\), and that the \(x_i\) values are measured without error. Under these assumptions, the least-squares slope estimate has variance \(\sigma^2/\sum_i(x_i-\bar{x})^2\).

$$ \operatorname{Var}(\hat{b}\mid x_1,\ldots,x_n) = \frac{\sigma^2}{\sum_{i=1}^{n}(x_i-\bar{x})^2} $$

The denominator is the total variation in the predictor. If it is close to zero, the slope is imprecisely estimated even when there are many observations; increasing the spread of informative predictor values reduces this variance in the idealized model. This is a justification for considering dynamic range, not a claim that a velocity fit is exactly this regression. Real count data, uncertainty in both species, and kinetic-model assumptions can violate the approximation. Variation is helpful only when it is measured reliably and is relevant to the fitted kinetic relationship.

Worked Example: Screening by Detection and Expression

Suppose 100 hypothetical cells are screened for two genes. Gene A has unspliced counts in 18 cells and spliced counts in 92. Gene B has unspliced counts in 76 cells and spliced counts in 83. Their mean counts over all cells are, respectively, 0.35 and 2.4 for Gene A, and 1.8 and 3.1 for Gene B. Calculate detection frequencies and compare the evidence.

For Gene A, the unspliced detection frequency is \(18/100=0.18\), or 18%, and the spliced detection frequency is \(92/100=0.92\), or 92%. For Gene B, these frequencies are \(76/100=0.76\), or 76%, and \(83/100=0.83\), or 83%.

Gene A has a low mean unspliced count and few cells with detected unspliced RNA. Its spliced species is broadly detected, but that does not compensate for the limited unspliced evidence. Gene B has higher mean counts and broader detection of both species, so it is the stronger candidate on these screening measures. This conclusion is provisional: variation and the kinetic fit still need evaluation.

Assessing Variation and the Kinetic Fit

After identifying genes with usable measurements, examine whether their values span a meaningful range across cells. A variance or interquantile range can flag genes with little variation; plotting the paired unspliced and spliced measurements can show whether the range is distributed across cells or dominated by a few observations. Detection frequencies should accompany these summaries because many zeros can make a variance or range difficult to interpret. A large variance alone does not establish useful kinetic information.

Next, consider the fit under the chosen kinetic model. Relevant evidence includes whether estimation converged, whether parameter estimates are finite and sufficiently well determined, and whether the fitted relationship describes the observed pattern without systematic departures. Residual patterns and uncertainty in gene-level estimates can help assess that evidence; see the earlier material on residuals and uncertainty in gene-level velocity estimates. A numerical fit summary can support comparison, but a high value of a single statistic is not proof that the model captures the gene’s dynamics.

Selection should not define an acceptable fit solely by the size of an unstandardized residual: its scale depends on the units and magnitude of the measurements. Nor should it use a single fit statistic without considering expression and variation. A fit may appear strong because a gene has a broad range, while a small number of cells or a narrow range can make the estimated relationship unstable. Conversely, imperfect fit does not always mean that the gene contains no directional information; it may indicate that the model is only an approximation or that the data do not support precise inference.

Worked Example: Comparing Dynamic Range

Two hypothetical genes each have measurements in 80 cells. For Gene C, the interquartile range (the 75th percentile minus the 25th percentile) is 0.2 counts for unspliced RNA and 0.4 counts for spliced RNA. For Gene D, the corresponding values are 2.1 and 3.0 counts. Both genes are detected in 70% of cells for each species. Which gene has stronger evidence of useful variation?

Gene C’s unspliced interquartile range is 0.2 counts, and its spliced interquartile range is 0.4 counts. Gene D’s ranges are 2.1 counts and 3.0 counts. Since detection frequencies are equal, the comparison is not explained by a difference in the proportion of cells with positive measurements. Gene D’s central 50% of measurements spans more values for both species, so it has stronger evidence of dynamic range.

This does not establish that Gene D should be retained: its measurements might not follow the fitted kinetic relationship, and its variation could still be insufficient relative to measurement variability. The calculation identifies which gene deserves the more favorable variation assessment, not which gene has a valid velocity estimate.

A Defensible Selection Workflow

1
Define the analysis set.
State which cells and which consistently processed spliced and unspliced measurements are being screened. Selection is conditional on these data and this cell population.
2
Check measurement availability.
Summarize mean counts and detection frequencies separately for both RNA species. Flag genes whose data are too sparse for the intended fit, using a stated rule appropriate to the dataset rather than assuming a universal cutoff.
3
Check variation.
Assess the range or spread across cells for both species and inspect whether the variation is supported across observations. Do not equate a high mean or a single extreme count with informative dynamic range.
4
Evaluate the kinetic fit.
Fit the selected model to eligible genes, then review convergence, parameter uncertainty, and whether the observed pattern is adequately represented. Keep model-fitting evidence distinct from expression filters.
5
Record and test the criteria.
Report the screening measures and thresholds, and check whether conclusions change under reasonable alternatives. Preserve the distinction between genes excluded for insufficient measurement and genes excluded for weak or unusable kinetic evidence.

Worked Example: Combining Screening Evidence

Consider two hypothetical genes measured in 120 cells. Gene E has unspliced detection in 24 cells and spliced detection in 110 cells. Its kinetic fit does not converge. Gene F has unspliced detection in 90 cells and spliced detection in 102 cells; both species show variation across the middle half of cells, and its fit converges with moderate residual deviations and finite parameter estimates. Which gene is the stronger candidate?

For Gene E, the detection frequencies are \(24/120=0.20\) for unspliced RNA and \(110/120\approx0.917\) for spliced RNA. Despite broad spliced detection, unspliced data are available in only 20% of cells, and the fit failed to converge. Both the measurement-availability evidence and the fit evidence are weak.

For Gene F, the frequencies are \(90/120=0.75\) and \(102/120=0.85\). Variation is present for both species, and the fit converged with finite estimates. Moderate residual deviations mean that the fit deserves scrutiny, not automatic rejection. On the stated evidence, Gene F is the stronger candidate. The conclusion is relative and conditional; it does not assert that the kinetic model is true or that Gene F’s velocity is error-free.

Alternatives, Diagnostics, and Limitations

A very permissive strategy fits every gene. It avoids discarding genes through arbitrary prefilters, but may spend effort on genes with too few usable observations or too little variation for meaningful estimates. A stringent strategy based on high expression or high variability alone can reduce the candidate set, but may exclude genes that are moderately expressed yet well distributed across cells and kinetically informative. A combined strategy is generally more transparent: use modest measurement-availability criteria, evaluate variation, and then assess the kinetic fit.

There is no dataset-independent detection threshold or minimum expression level that guarantees reliable velocity inference. Detection depends on the experiment and processing, and threshold choices can alter which genes enter the analysis. State the rules and, where feasible, compare results under nearby cutoffs. Also distinguish selection for estimation from biological prioritization: a gene excluded because its unspliced species is rarely measured is not thereby biologically unimportant.

Warning signs include a gene retained because one species is abundant while the other is nearly absent, a wide range caused by only one or two cells, nonconvergent fitting, or parameter estimates that are not meaningfully determined. These signals suggest that the gene may not support the intended inference. They are not interchangeable diagnoses: sparse measurement, limited variation, and poor model fit have different causes and should be reported separately. Detailed treatment of count sparsity and kinetic-model misfit belongs to their respective analyses.

A further limitation is that screening on the same data later used for inference can make the retained set dependent on the observed sample. Selection is not a correction for model error, and passing the screen does not validate the model. Gene selection narrows attention to plausible candidates; uncertainty and model assumptions still matter when interpreting the resulting estimates.

Common mistake: “This gene has the largest mean count, so it must be the best velocity gene.” A high mean does not show that both spliced and unspliced species are detected broadly, that values vary across cells, or that the kinetic fit is usable. Compare both species’ detection, assess variation, and evaluate the fit before deciding.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. In 50 cells, a gene has unspliced counts above zero in 15 cells and spliced counts above zero in 40 cells. What are the two detection frequencies, and what does their difference tell you?
  2. Why can a high mean count fail to establish that a gene has useful dynamic range?
  3. In the regression justification, what happens to the slope variance as \(\sum_i(x_i-\bar{x})^2\) decreases, assuming \(\sigma^2\) remains fixed?
  4. A gene has broad detection and substantial variation, but kinetic fitting does not converge. Is it established as suitable for velocity inference? Explain.
  5. Why should a study report its expression and detection criteria rather than present a fixed threshold as universally valid?

Solutions. (1) The unspliced detection frequency is \(15/50=0.30\), or 30%; the spliced frequency is \(40/50=0.80\), or 80%. Spliced RNA is observed in many more cells, so unspliced measurement availability may limit the fit. (2) A high mean could be driven by a small number of cells and says neither how widely counts are detected nor how much they vary across the rest. (3) The variance \(\sigma^2/\sum_i(x_i-\bar{x})^2\) increases, so the slope estimate is less precise in this idealized model. (4) No. The failed fit is evidence that the chosen model could not provide a usable estimate, despite favorable detection and variation; the cause should be distinguished from measurement scarcity. (5) Detection and expression depend on the data and analysis context, and a threshold can change which genes are retained. Reporting the rule makes the selection transparent and allows its sensitivity to be assessed.

Clinical Biostats