A condition can change which cells are present as well as what they express. A cube
records how many cells of each type every sample holds (Cube.n_cells), and
propeller tests whether the share of each cell type differs between conditions,
as speckle’s propeller does Phipson et al., 2022. Proportions estimated from single-cell
data are variable, so the test compares samples, the biological replicates, not cells.
The steps¶
Proportions. Sample , with cells of type and cells in all, has the proportion of type .
Transform. The logit, , of the proportions after half a cell is added to every count, , so that a type absent from a sample has a finite value; or the arcsine square root, .
Linear model. The transformed proportions of every cell type are fitted with the design (Designs, linear models and contrasts).
Moderation. The residual variances of the cell types are moderated by empirical Bayes, robustly by default, as speckle does (Empirical Bayes moderation; Phipson et al. (2016)).
Tests. Each contrast is tested by its moderated t-statistic;
f_testnames a factor whose levels are tested together by a moderated F-statistic. p-values are adjusted by the method of Benjamini and Hochberg over the cell types.
The result, a CompositionResult, holds a table for every contrast
(CompositionResult.table) and one for the F-test, with speckle’s descriptive
columns: the baseline proportion of every cell type, the mean proportion in each level
of the factor a contrast compares, and their ratio. Its summary says which cell types
and samples were left out, and why.
Choices¶
The denominator. Proportions are taken over the cell types of the data. To test the composition within one lineage, such as the T cell subtypes, select its cell types first (
Cube.select); then a shift in another lineage does not move them.The transform. The logit, speckle’s default, or the arcsine square root (
transform="asin").Samples and cell types without cells. A sample without cells has no proportions and is left out; a cell type without cells in any sample used is left out, as it was not observed.
Limits¶
propeller fits fixed effects only: a design with random effects is refused, so a donor
sampled in every condition enters the formula as a fixed effect, as in
~ donor + condition. Precision-weighted mixed models of composition (crumblr;
Hoffman & Roussos (2026)) and Bayesian count models, such as scCODA Büttner et al., 2021 and sccomp
Mangiola et al., 2023, are not implemented.
- Phipson, B., Sim, C. B., Porrello, E. R., Hewitt, A. W., Powell, J., & Oshlack, A. (2022). propeller: testing for differences in cell type proportions in single cell data. Bioinformatics, 38(20), 4720–4726. 10.1093/bioinformatics/btac582
- Phipson, B., Lee, S., Majewski, I. J., Alexander, W. S., & Smyth, G. K. (2016). Robust hyperparameter estimation protects against hypervariable genes and improves power to detect differential expression. The Annals of Applied Statistics, 10(2), 946–963. 10.1214/16-AOAS920
- Hoffman, G. E., & Roussos, P. (2026). Fast, flexible analysis of differences in cellular composition with crumblr. Nature Communications, 17(1), 9598. 10.1038/s41467-026-75681-7
- Büttner, M., Ostner, J., Müller, C. L., Theis, F. J., & Schubert, B. (2021). scCODA is a Bayesian model for compositional single-cell data analysis. Nature Communications, 12(1), 6876. 10.1038/s41467-021-27150-6
- Mangiola, S., Roth-Schulze, A. J., Trussart, M., Zozaya-Valdés, E., Ma, M., Gao, Z., Rubin, A. F., Speed, T. P., Shim, H., & Papenfuss, A. T. (2023). sccomp: Robust differential composition and variability analysis for single-cell data. Proceedings of the National Academy of Sciences, 120(33), e2203828120. 10.1073/pnas.2203828120