Why the Selection Rule Matters
After filtering low-expression genes and choosing an expression scale, a feature-selection procedure still needs a rule for deciding which genes to retain. A rule that selects the highest-ranked genes always returns a prespecified number, whereas a score cutoff returns however many genes meet the threshold. These choices affect the size and composition of the selected set, so the rule should be described alongside the resulting gene list.
This tutorial compares three choices: selecting a fixed number of genes by rank, selecting genes above a dispersion cutoff, and selecting genes above a residual-variability cutoff. The scores must be computed on the chosen expression scale and with a specified scoring procedure. The introductory material on expression scales for variability modeling motivates that choice; here the focus is how the selection rule uses the resulting scores.
The score is not itself the selection rule. For example, regularized dispersion scores and residual-based scores can both rank genes, but a value of 1.5 on one score scale does not generally mean the same thing as 1.5 on another. A cutoff is interpretable only with its scoring method and scale specified. Neither a high score nor selection by a cutoff is, by itself, a hypothesis test or a claim that a gene is biologically important.
Fixed Counts and Score Cutoffs
Write the scores for the \(G\) eligible genes in descending order as \(S_{(1)} \geq S_{(2)} \geq \cdots \geq S_{(G)}\). A fixed-count rule selects the genes occupying the first \(K\) ranks. If scores tie at the boundary, a tie-breaking convention is needed to return exactly \(K\) genes. A deterministic convention, such as ordering tied genes by a prespecified gene identifier, makes the count reproducible but does not make the tied genes biologically distinguishable.
A cutoff rule instead selects scores satisfying \(S_g \geq c\). Its selected count is determined by the observed score distribution. If the boundary is tied, every gene meeting the cutoff is selected, so the result may contain more genes than a target count. Changing the inequality to \(S_g>c\) changes what happens to genes exactly at the threshold; state which convention is used.
The result follows directly from the ordering. For \(1 \leq K < G\), the condition \(c \leq S_{(K)}\) includes the first \(K\) ranked genes, while \(S_{(K+1)} < c\) excludes every gene ranked below them. Together they select exactly the first \(K\). For \(K=G\), there is no \((G+1)\)st score: all genes are selected precisely when the cutoff is no greater than the smallest eligible score, \(S_{(G)}\). These conditions concern counts, not the substantive adequacy of the selected genes.
Worked Example: Choosing a Dispersion Cutoff to Match a Count
Suppose eight eligible genes have dispersion scores, in descending order, of 2.40, 2.10, 1.80, 1.50, 1.20, 1.00, 0.80, and 0.60. A fixed-count rule with \(K=3\) selects the first three genes, with scores 2.40, 2.10, and 1.80.
With the cutoff convention \(S_g \geq c\), a threshold of \(c=1.6\) selects those same three genes: each of their scores is at least 1.6, while the fourth score, 1.50, is below it. The boundary condition is \(1.50 < 1.6 \leq 1.80\), so this cutoff selects exactly three genes.
If the threshold is instead \(c=1.4\), the first four genes meet the cutoff because the fourth score is 1.50. The cutoff now selects four genes, while the fixed-count rule still selects three. A cutoff is therefore not equivalent to a fixed count unless the scores and threshold produce the required boundary.
Dispersion and Residual Cutoffs in Practice
A dispersion-cutoff rule selects genes whose chosen dispersion measure reaches a stated threshold. Depending on the scoring procedure, the measure may be adjusted for the mean-variance relationship rather than being raw variance. The selection rule does not determine how dispersion was estimated; that definition and any trend adjustment must be reported separately. This distinction matters because a cutoff on unadjusted variance can favor genes with larger means, even when the scientific aim is to identify variability beyond that associated with the mean.
A residual-cutoff rule acts on a summary of residual behavior after the specified model has been fitted. One transparent example is the sample variance of a gene’s Pearson residuals across \(n\) cells. If \(r_{gc}\) is the residual for gene \(g\) in cell \(c\), define \(Q_g = \frac{1}{n-1}\sum_{c=1}^{n}(r_{gc}-\bar{r}_g)^2\), where \(\bar{r}_g\) is that gene’s mean residual across cells. A rule using \(Q_g \geq c\) selects genes with sufficiently large residual variance under this particular definition. Other procedures may summarize residuals differently, so the formula must accompany the threshold.
A residual score is not automatically a p-value, and a cutoff such as \(Q_g \geq 1\) does not establish statistical significance. Residuals depend on the fitted model, its assumptions, the expression-scale and normalization choices, and any residual-processing convention. A residual cutoff describes a feature-selection decision on the resulting scores; it does not certify that all model assumptions hold.
Worked Example: Applying a Residual-Variability Cutoff
Consider four eligible genes measured in \(n=4\) cells. For illustration, suppose their residual vectors are: gene A, \((-1,1,-1,1)\); gene B, \((-0.5,0.5,-0.5,0.5)\); gene C, \((-2,0,0,2)\); and gene D, \((-0.2,0.1,0,0.1)\). Use the sample variance \(Q_g\), with denominator \(n-1=3\), and select genes when \(Q_g \geq 1\).
Each vector has mean zero. For gene A, \(Q_A=[(-1)^2+1^2+(-1)^2+1^2]/3=4/3=1.333\). For gene B, \(Q_B=[(-0.5)^2+0.5^2+(-0.5)^2+0.5^2]/3=1/3=0.3333\).
For gene C, \(Q_C=[(-2)^2+0^2+0^2+2^2]/3=8/3=2.667\). For gene D, \(Q_D=[(-0.2)^2+0.1^2+0^2+0.1^2]/3=0.06/3=0.0200\). Thus, at \(c=1\), genes A and C are selected. If the cutoff were \(c=1.5\), only C would be selected. A fixed-count rule with \(K=2\) also selects A and C here, but that agreement is a feature of these scores, not a general equivalence between rules.
These calculations illustrate the rule, not a fitted analysis of actual data. In practice, the residuals should come from the stated model, and their adequacy should be assessed rather than presumed from this arithmetic.
Dataset Size Changes What a Rule Means
The number of eligible genes \(G\) can vary because datasets differ in measured genes or because filtering retains different numbers. A fixed \(K\) then represents different fractions of the eligible set. Conversely, a score cutoff can select different numbers of genes in different datasets because their score distributions differ. Neither rule guarantees the same fraction or the same biological composition across datasets.
The number of cells also matters. With fewer cells, gene-level variability scores may be estimated less precisely; with more cells, those scores may be more stable, though this depends on the sampling and model. Increasing cell count does not, by itself, imply that a particular gene should pass a fixed numerical cutoff. The cutoff must remain tied to its score definition and analysis purpose.
Worked Example: The Same Count in Two Dataset Sizes
Suppose Dataset A has \(G_A=1{,}000\) eligible genes measured in 500 cells, while Dataset B has \(G_B=20{,}000\) eligible genes measured in 5,000 cells. A fixed-count rule selects \(K=200\) genes in each dataset. In Dataset A the selected fraction is \(200/1{,}000=0.20\), or 20.0%; in Dataset B it is \(200/20{,}000=0.0100\), or 1.00%.
Now suppose, hypothetically, that a dispersion cutoff selects 180 genes in A and 2,400 in B. These correspond to \(180/1{,}000=18.0\%\) and \(2{,}400/20{,}000=12.0\%\) of eligible genes. Suppose a separately defined residual cutoff selects 140 genes in A and 900 in B, or 14.0% and 4.50%, respectively. These counts are hypothetical summaries of two score distributions; they are not derived from the cell counts alone.
The fixed-count rule controls the absolute number but not the selected fraction. The cutoff rules control the score criterion but not the count. The different cell numbers may affect score estimation, but these numbers alone do not show whether either selected set is more reliable or more biologically useful. That requires checking the model and the score distributions in each dataset.
Diagnostics, Comparisons, and Limitations
Before using a selection rule, verify that the eligible-gene set, score definition, direction of ranking, and cutoff inequality are explicit. Then examine the score distribution near the selection boundary. A large gap between \(S_{(K)}\) and \(S_{(K+1)}\) means a range of thresholds yields the same fixed-count set; a tie at the boundary means a score cutoff cannot reproduce exactly \(K\) genes under the \(S_g \geq c\) convention. For a cutoff rule, report both \(c\) and the number of genes selected, since the threshold alone does not communicate set size.
For residual scores, also inspect whether the fitted model and residual calculations are behaving as intended. Systematic residual patterns or remaining library-size effects can undermine the interpretation of a residual-variability score. A numerical cutoff cannot correct model misspecification or substitute for residual diagnostics. Because no single cutoff is universally calibrated across score definitions and datasets, any comparison should state whether the same scale, scoring method, filtering rule, and threshold were used.
| Rule | What it controls | Main practical caution |
|---|---|---|
| Fixed gene count | Number selected, subject to a tie-breaking rule | The selected fraction changes with \(G\); a fixed count always returns genes even if the boundary scores are weak. |
| Dispersion cutoff | Minimum specified dispersion score | Selected count varies with the score distribution and the dispersion definition. |
| Residual cutoff | Minimum specified residual-variability score | Interpretation depends on the fitted model and residual summary; the threshold is not a significance test. |
These rules answer different operational questions. A fixed count is useful when an analysis requires a specified number of features, but it does not ensure that the last selected gene is meaningfully separated from the next one. A dispersion cutoff makes the minimum score explicit, but selected-set size can vary. A residual cutoff likewise states a minimum residual score, but its meaning is conditional on how residuals were obtained and summarized. In every case, the threshold and count are choices for feature selection, not evidence of causation, biological importance, or inferential significance.
Common Mistake
A common mistake is to say, “I selected the top 200 genes, so the cutoff is the score of the 200th gene,” and then treat that as an exact score threshold without checking ties. If the 200th and 201st genes have the same score, a rule \(S_g \geq S_{(200)}\) selects at least 201 genes. The correction is to distinguish the rank-based rule, which may use a stated tie-break to return exactly 200, from the score-cutoff rule, which includes every gene meeting the threshold. Also check the endpoint: the condition involving \(S_{(K+1)}\) applies only when \(1 \leq K < G\); selecting all \(G\) genes by cutoff requires \(c \leq S_{(G)}\).
Check Your Understanding
Answer each question, then check the solution directly below it.
- Six eligible genes have descending scores \(3.0, 2.4, 1.9, 1.5, 1.1,\) and \(0.7\). Under the rule \(S_g \geq c\), what range of \(c\) selects exactly the top three?
- There are \(G=500\) eligible genes and a fixed-count rule selects \(K=100\). What fraction of eligible genes is selected? If another dataset has \(G=2{,}000\) and uses the same \(K\), what fraction is selected there?
- The scores at ranks 4 and 5 are both 1.2. Can any rule \(S_g \geq c\) select exactly four genes? Explain.
- For a residual vector \((-1,0,1)\), calculate its sample variance. Would it pass a residual-variance cutoff \(c=0.5\) using \(Q_g \geq c\)?
Solutions. (1) The exact-count condition is \(S_{(4)} < c \leq S_{(3)}\), so \(1.5 < c \leq 1.9\). For example, \(c=1.7\) selects three genes. (2) The first fraction is \(100/500=0.20\), or 20.0%. The second is \(100/2{,}000=0.0500\), or 5.00%. (3) No. A cutoff at or below 1.2 includes both genes tied at ranks 4 and 5, while a cutoff above 1.2 excludes both; it cannot include exactly four. (4) The mean is zero and \(Q_g=[(-1)^2+0^2+1^2]/(3-1)=2/2=1.00\). Since \(1.00 \geq 0.5\), the gene passes the stated cutoff.