Welcome to cell2location’s documentation!¶
For installation instructions see: https://github.com/BayraktarLab/cell2location#Installation
For FAQ and to ask any questions please use scverse discourse: on cell2location https://discourse.scverse.org/c/ecosytem/cell2location/42, on scvi-tools https://discourse.scverse.org/c/help/scvi-tools/7 or in Visium data https://discourse.scverse.org/c/general/visium/32.
For reporting bugs or other issues with cell2location please use GitHub Issues: https://github.com/BayraktarLab/cell2location/issues
- Mapping human lymph node cell types to 10X Visium with Cell2location
- Workflow diagram
- Loading packages
- Loading Visium and scRNA-seq reference data
- Estimation of reference cell type signatures (NB regression)
- Cell2location: spatial mapping
- Visualising cell abundance in spatial coordinates
- Downstream analysis
- Advanced use
Cell2location package is implemented in a general way (using https://pyro.ai/ and https://scvi-tools.org/) to support multiple related models - both for spatial mapping and estimating reference cell type signatures:
Cell2location for spatial mapping of cell types which estimates cell abundance by decomposing spatial data into reference expression signatures of cell types (LocationModelLinearDependentWMultiExperimentLocationBackgroundNormLevelGeneAlphaPyroModel).
Models for estimating reference expression signatures of cell types from scRNA data, accounting for variable sequencing depth between batches (e.g. 10X reaction), additive background (contaminating RNA), multiplicative platform effect between scRNA technologies.
Cell2location model for mapping to Nanostring WTA data (LocationModelWTA). See https://github.com/vitkl/SpaceJam for a new more versatile version.
Similified versions of model #1 that lack particular features of the full model, accessible from cell2location.models.simplified
Additionally we provide 2 models for downstream analysis of cell abundance estimates, accessible from cell2location.models.downstream:
CoLocatedGroupsSklearnNMF - identifying groups of cell types with similar locations using NMF (wrapper around sklearn NMF). See tutorial for usage.
ArchetypalAnalysis - identifying smoothly varying and mutually exclusive tissue zones with Archetypa Analysis.
- Initial gene filtering
- Reference signatures (NB regression)
- Reference signatures (hard-coded, cell type hierarchy)
- Cell2location: spatial mapping (scvi-tools/pyro)
- User-facing cell2location spatial cell abundance estimation model class (scvi-tools BaseModelClass)
- Pyro and scvi-tools Module classes (inc math description)
- Simplified model architectures
- Downstream Analysis Models
- Plot cell abundance for multiple cell types using colour interpolation
- Plot heatmap and dotplot (hierarchically clustered but without showing the tree)
- Other plotting functions
- Module contents
- General utils
- Pyro and scvi-tools infrastructure classes
- Statistical distribution classes