Introduction
recall (Calibrated Clustering with Artificial Variables) is a statistical framework designed to address the fundamental problem of over-clustering in single-cell RNA-sequencing (scRNA-seq) data analysis.
The Double-Dipping Problem
In standard scRNA-seq analysis pipelines:
- Clustering: Cells are grouped based on gene expression patterns
- Differential Expression Testing: Genes are tested for differential expression between clusters
This creates a statistical problem known as double-dipping: the same data is used both to define groups and to test for differences between them. This leads to:
- Inflated test statistics
- Overly optimistic p-values
- Increased false discovery rates
- Over-clustering: finding more clusters than biologically meaningful
Mathematical Framework
The Knockoff Filter
The knockoff filter (Barber & Candès, 2015) is a powerful method for variable selection with FDR control. Given original features , we construct knockoff features that:
- Preserve the correlation structure of the original features
- Are exchangeable with the originals conditional on the response
- Are known a priori to be null (not associated with the response)
The recall Algorithm
Stage 1: Synthetic Null Variable Generation
Given the expression matrix (cells × genes), we generate synthetic “knockoff” genes by:
- Estimating marginal distributions for each gene
- Sampling from the estimated distribution to create knockoffs
Stage 2: Joint Analysis
The augmented matrix undergoes:
- Normalization: Log-normalization
- Feature Selection: Selecting top variable features from both original and knockoff genes
- Dimensionality Reduction: PCA on the augmented data
- Clustering: Louvain or Leiden algorithm
Stage 3: Iterative Calibration
Algorithm: FindClustersRecall
─────────────────────────────────────────
Input: Seurat object, resolution_start, q (target FDR)
Output: Calibrated cluster assignments
1. Generate knockoff features
2. resolution ← resolution_start
3. REPEAT:
a. Cluster augmented data at current resolution
b. FOR each cluster pair (i, j):
- Compute differential expression (original vs knockoff)
- Apply knockoff filter at FDR = q
- IF no genes selected:
Mark pair as "not significantly different"
BREAK
c. IF all pairs significantly different:
RETURN cluster assignments
d. resolution ← resolution × (1 - reduction_percentage)
4. RETURN cluster assignments
Zero-Inflated Poisson Estimation
Maximum Likelihood Estimation
For count data following ZIP(, ):
The MLE has a closed-form solution using the Lambert W function:
where and is the observed zero proportion.
Implementation
library(recall)
# Simulate ZIP data
set.seed(42)
true_lambda <- 2.5
true_pi <- 0.3
data <- rzipoisson(1000, lambda = true_lambda, prop.zero = true_pi)
# Estimate parameters
params <- estimate_zi_poisson(data)
print(params)
# $lambda.hat: ~2.5
# $pi.hat: ~0.3Negative Binomial Estimation
For overdispersed count data, the negative binomial distribution is parameterized as:
The estimate_negative_binomial() function uses a cascade
of estimation methods:
- MASS::fitdistr (Nelder-Mead optimization)
- fitdistrplus::fitdist (MLE)
- Method of Moments
- Quantile Matching
- Maximum Goodness-of-fit
Copula Models
When gene-gene correlations are important, copula models preserve the dependency structure:
Gaussian Copula
- Fit marginal distributions to each gene
- Transform to uniform marginals via probability integral transform
- Fit Gaussian copula to capture dependencies
- Simulate by sampling from copula and transforming back
# Use copula-based knockoffs for better correlation modeling
pbmc <- FindClustersRecall(
pbmc,
null_method = "NB-copula", # Negative Binomial with Gaussian copula
cores = 4
)Theoretical Guarantees
References
Barber, R. F., & Candès, E. J. (2015). Controlling the false discovery rate via knockoffs. The Annals of Statistics, 43(5), 2055-2085.
DenAdel, A., et al. (2025). A knockoff calibration method to avoid over-clustering in single-cell RNA-sequencing. American Journal of Human Genetics.
Neufeld, A., et al. (2022). Inference after latent variable estimation for single-cell RNA sequencing data. Biostatistics.
Lambert, D. (1992). Zero-inflated Poisson regression, with an application to defects in manufacturing. Technometrics, 34(1), 1-14.