CellRank for directed single-cell fate mapping¶

CellRank is a toolkit to uncover cellular dynamics based on Markov state modeling of single-cell data. It contains two main modules: kernels compute cell-cell transition probabilities and estimators generate hypothesis based on these. Our kernels work with a variety of input data including RNA velocity (see [Manno18] and [Bergen20]), cellular similarity (both transcriptomic and spatial) and pseudotime, among others. Our VelocityKernel takes into account uncertainty in the velocities and allows you to aggregate the short-range fate relations given by RNA velocity into longer trends along the phenotypic manifold. Our main estimator is Generalized Perron Cluster Cluster Analysis (G-PCCA) [GPCCA18] which coarse-grains the Markov chain into a set of macrostates which represent initial, terminal and intermediate states. For each transient cell, we compute its fate probability towards any terminal state. We show an example of such a fate map in the figure above, which has been computed using the data of [Panc19]. CellRank combines kernels and estimators with a powerful plotting API, enabling you to visualize e.g. smooth gene expression trends along lineages or fate-informed circular embeddings, to name just a few.
CellRank scales to large cell numbers, is fully compatible with scanpy and scvelo and is easy to use.
Getting started with CellRank¶
If you’re new to CellRank, make sure to go though the basic tutorial which introduces you to CellRank’s high-level API. Most biological systems require a bit more control, so be sure to check out the kernels and estimators tutorial which allows to unlock the full power of CellRank. If you want to see individual functions in action, visit our gallery.
Latest additions¶
1.3.0 2021-03-29¶
This release includes some major additions which make CellRank more applicable with and without RNA velocity information. In particular, it includes:
Additions
Add new kernel
cellrank.tl.kernels.CytoTRACEKernel
which computes cell-cell transition probabilities based on the CytoTRACE score [Cyto20], a measure of differentiation potential, PR 527.Add external API
cellrank.external
with a stationary optimal transport kernelcellrank.external.kernels.OTKernel
contributed from [Zhang21], as well as a contributing guide, PR 522.Rename
cellrank.tl.kernels.PalantirKernel
tocellrank.tl.kernels.PseudotimeKernel
and add hard thresholding scheme inspired by [Setty19], a soft thresholding scheme inspired by [VIA21] and a custom scheme when computing the transition matrix, see e.g.cellrank.tl.kernels.SoftThresholdScheme
PR 514.Add more flexibility to
cellrank.tl.kernels.ConnectivityKernel
, allowing it to use any cell-cell similarities fromanndata.AnnData.obsp
, such as spatial similarities fromsquidpy
[Palla21] PR 501.Revamp Pancreas Advanced tutorial to showcase CellRank’s modular structure of kernels and estimators. PR 32.
Add 2 new tutorials:
Beyond RNA velocity: shows how to use CellRank when no RNA velocity information is available. PR 32
Creating a new kernel: explains how to create your own custom kernel class that estimates cell-cell transition probabilities PR 31.
Add projection of transition matrix onto an embedding
cellrank.tl.kernels.Kernel.compute_projection()
Add random walk simulation and visualization in an embedding
cellrank.tl.kernels.Kernel.plot_random_walks()
PR 537.Add
cellrank.tl.Lineage.priming_degree()
PR 502 which estimates a cell’s plasticity/differentiation potential based on ideas by [Setty19] and [Velten17].Add checks for transition matrix irreducibility PR 516.
Add Zebrafish development dataset from [Farrel18] PR 539.
Speed-up stationary distribution calculation in
pygpcca
PR 22.
Bugfixes
CellRank’s key applications¶
compute initial & terminal as well as intermediate macrostates of your biological system
infer fate probabilities towards the terminal states for each individual cell
visualize gene expression trends along specific lineages while accounting for the continuous nature of fate determination
identify potential driver genes for each identified cellular trajectory
Why is it called “CellRank”?¶
CellRank does not rank cells, we gave the package this name because just like Google’s original PageRank algorithm, it works with Markov chains to aggregate relationships between individual objects (cells vs. websites) to learn about more global properties of the underlying dynamics (initial & terminal states and fate probabilities vs. website relevance).
Support¶
We welcome your feedback! Feel free to open an issue, send us an email or tweet if you encounter a bug, need our help or just want to make a comment/suggestion.
Contributing¶
We actively encourage any contribution! To get started, please check out both the contribution guide as well as the external API. CellRank’s modular structure makes it easy to contribute, be it a new method to compute cell-cell transition probabilities (kernels), a new way to analyze a transition matrix (estimators) or an addition to the plotting API. If you’re thinking of contributing a new kernel, we have a kernel tutorial that guides you trough the process.
CellRank was developed in collaboration between the Theislab and the Peerlab.