Sample-level statistics for pseudobulk and bulk omics data, in Python.
Studies that compare conditions, donors or treatments ask questions about samples: cells of one donor are not independent replicates, and a test that treats them as such finds differences that other donors do not share Squair et al., 2021Zimmerman et al., 2021. CytePool pools the cells of each sample and cell type into a cube of pseudobulk profiles, which can be saved, shared and traced back to the cells, and tests them with the methods that are standard in R: limma, edgeR, DESeq2, dream, propeller and metafor. Its only required dependencies are numpy and numba, and every method is compared with the package that defined it (Validation).
Installation · Quick start · Differential expression per cell type · Choosing a method · Capability matrix · API reference
The questions CytePool answers¶
Studies of many samples, across immune and brain cohorts, population genetics, pathways, interactions, pharmacology and atlases, come back to ten questions. This is what CytePool offers for each today.
| Question | What CytePool offers | Where to read |
|---|---|---|
| Which genes change in each cell type? | limma-voom, limma-trend and dream on every cell type of a cube; edgeR’s quasi-likelihood tests and DESeq2 on one matrix at a time | Differential expression per cell type, Bulk RNA-seq, Choosing a method |
| Which cell types expand or contract? | propeller. Not yet: precision-weighted mixed models or count models of composition | Composition tests |
| Which pathways and regulators respond? | camera, fry, roast, mroast and romer on any contrast. Not yet: activity scores of pathways and transcription factors | Gene-set tests |
| What drives the variation between donors, and what must be adjusted for? | Design checks for confounded factors, sample quality weights, and mixed models that estimate a variance per random effect for every gene. Not yet: variance partitioning | Designs, linear models and contrasts, Mixed models, REML and dream |
| Does it replicate, and how should studies be combined? | Meta-analysis of every gene across studies, with the between-study variance, Q and I². Not yet: replication measures and shrinkage across studies | Meta-analysis |
| Can patients be stratified from their profiles? | Not yet; cubes convert to AnnData and MuData for other tools | Capability matrix |
| Which cell-cell interactions change? | Not yet | Related software |
| Do effects depend on genotype, time, sex or context? | Interactions and F-tests in designs, likelihood ratio tests, random intercepts for repeated measures. Not yet: random slopes. QTL mapping is left to dedicated tools | Designs, linear models and contrasts, Count models |
| How do cells respond to drugs and doses? | A dose as a factor or a covariate of a design. Not yet: dose-response fits, benchmark doses, synergy | Capability matrix |
| Can public studies be pooled into one cube? | Not yet; cubes import the pseudobulk layouts of scanpy, decoupler and LIANA, and meta-analysis combines results across cubes | Export a cube from another tool, Meta-analysis |
The Literature page collects studies behind these questions, and the Capability matrix lists every method with the reference it is checked against, and what is not implemented yet.
Principles¶
Samples are the unit of replication. Cells are pooled into samples before any test, and a cube records how many cells each profile holds.
Traceable results. A cube’s fingerprint names its values, its provenance record says how it was made, and every result keeps both.
Checked against the reference implementations. Each area has a script in
validation/that runs the reference package as a separate program on the same inputs.Implemented from the literature. Methods whose reference packages carry copyleft licences are written from their papers and documentation, never from their source code, so that CytePool can stay BSD-licensed.
Two required dependencies, numpy and numba. Numerical routines are compiled the first time they run and cached on disk.
Help and contributing¶
Report a bug or ask a question on GitHub. The README lists the checks a change must pass, and Installation shows how to build this site.
- Squair, J. W., Gautier, M., Kathe, C., Anderson, M. A., James, N. D., Hutson, T. H., Hudelle, R., Qaiser, T., Matson, K. J. E., Barraud, Q., Levine, A. J., La Manno, G., Skinnider, M. A., & Courtine, G. (2021). Confronting false discoveries in single-cell differential expression. Nature Communications, 12(1), 5692. 10.1038/s41467-021-25960-2
- Zimmerman, K. D., Espeland, M. A., & Langefeld, C. D. (2021). A practical solution to pseudoreplication bias in single-cell studies. Nature Communications, 12(1), 738. 10.1038/s41467-021-21038-1