scFastDE provides fast, donor-weighted pseudo-bulk differential expression for multi-donor single-cell RNA-seq experiments.
Standard pseudo-bulk DE tools (DESeq2, edgeR, muscat) have three common problems that scFastDE addresses:
sqrt(n_cells), giving principled influence
to well-represented donors without discarding sparse ones~ 0 + condition + donor blocking model
SingleCellExperiment in, FDEResult S4 out; results
slot into any standard Bioconductor workflow# From Bioconductor (once accepted)
BiocManager::install("scFastDE")
# Development version from GitHub
BiocManager::install("SubhadipJana1409/scFastDE")
Each donor belongs to exactly one condition (e.g. healthy vs disease).
library(scFastDE)
# Step 1: remove donors with too few cells per cell type
sce <- filterSparseDonors(sce, donor = "donor",
cell_type = "cell_type", min_cells = 10)
# Step 2: run DE — auto-detects unpaired, uses ~ 0 + condition
result <- fastDE(sce,
donor = "donor",
cell_type = "cell_type",
condition = "disease",
target_type = "CD4_Tcell")
# Step 3: inspect
head(deTable(result))
# Step 4: visualise
plotDEResults(result)
Same donors contribute cells under multiple conditions (e.g. ctrl + stim). scFastDE detects this automatically — no extra arguments needed.
# fastDE sees that donors appear in both conditions and switches to:
# - pseudo-bulk per donor × condition (16 samples for 8 donors × 2 conditions)
# - design: ~ 0 + condition + donor (blocks on donor)
result <- fastDE(sce,
donor = "donor",
cell_type = "cell_type",
condition = "stim",
target_type = "CD14_Monocyte")
result
# FDEResult
# Genes tested : 10821
# Samples : 16 ← 8 donors × 2 conditions
# Significant : 5550 (adj.P.Val < 0.05)
# Design : paired ← auto-detected
| Function | Description |
|---|---|
filterSparseDonors() |
Remove donors below minimum cell count per cell type |
fastPseudobulk() |
Vectorised pseudo-bulk aggregation — per donor or per donor × condition |
fastDE() |
Fast limma-voom DE with auto-detected paired/unpaired model and cell-count weights |
plotDEResults() |
Volcano plot with FDR + logFC significance colouring |
On the Kang et al. 2018 IFN-β PBMC dataset (8 donors × 2 conditions):
| Approach | Known IFN-β genes detected | Total DE genes |
|---|---|---|
| Naive aggregation by donor | 0 / 10 | 0 |
| scFastDE paired model | 10 / 10 | 5,550+ |
The difference is caused by mixing ctrl and stim cells into a single pseudo-bulk per donor — the treatment signal is washed out before the model even runs. scFastDE aggregates per donor × condition pair, preserving the within-donor contrast.
Results are returned as a FDEResult object with accessor methods:
deTable(result) # DataFrame: logFC, P.Value, adj.P.Val, t, B per gene
pseudobulk(result) # matrix: aggregated counts (genes x samples)
donorWeights(result) # numeric: sqrt(n_cells) weight per sample
Jana S (2026). scFastDE: Fast Donor-Weighted Pseudo-Bulk Differential Expression for Single-Cell RNA-seq. R package version 0.99.0. https://github.com/SubhadipJana1409/scFastDE
MIT © Subhadip Jana