Import CellRank as:

import cellrank as cr

Once velocities and the velocity graph have been computed using either scvelo or velocyto, CellRank offers two modes to interact with its core functionality:

Additionally, there is a set of plotting functions which can be used downstream of either analysis mode.

The utilities are mainly for fitting continuous models to gene expression data and are utilized in some of the plotting functions, like cellrank.pl.gene_trends().


Kernels are part of the low-level API and are used to estimate cell-to-cell transitions.

kernels.VelocityKernel(adata[, backward, ...])

Kernel which computes a transition matrix based on RNA velocity.

kernels.ConnectivityKernel(adata[, ...])

Kernel which computes transition probabilities based on similarities among cells.

kernels.PseudotimeKernel(adata, time_key[, ...])

Kernel which computes directed transition probabilities based on a KNN graph and pseudotime.

kernels.CytoTRACEKernel(adata[, backward])

Kernel which computes directed transition probabilities based on a KNN graph and the CytoTRACE score [Gulati et al., 2020].

kernels.PrecomputedKernel(object[, adata, ...])

Kernel which contains a precomputed transition matrix.

External Kernels#

external.kernels.StationaryOTKernel(adata, g)

Stationary optimal transport kernel from [Zhang et al., 2021].

external.kernels.WOTKernel(adata, time_key)

Waddington optimal transport kernel from [Schiebinger et al., 2019].


Estimators predict cell fates using the transitions derived from Kernels.

estimators.GPCCA(object, **kwargs)

Generalized Perron Cluster Cluster Analysis [Reuter et al., 2018] as implemented in pyGPCCA.

estimators.CFLARE(object, **kwargs)

Compute the initial/terminal states of a Markov chain via spectral heuristics.


pl.circular_projection(adata, keys[, ...])

Plot absorption probabilities on a circular embedding [Velten et al., 2017].

pl.gene_trends(adata, model, genes[, ...])

Plot gene expression trends along lineages.

pl.log_odds(adata, lineage_1[, lineage_2, ...])

Plot log-odds ratio between lineages.

pl.heatmap(adata, model, genes[, lineages, ...])

Plot a heatmap of smoothed gene expression along specified lineages.

pl.cluster_trends(adata, model, genes, lineage)

Cluster and plot gene expression trends within a lineage.


Plot aggregate lineage probabilities at a cluster level.


models.GAM(adata[, n_knots, spline_order, ...])

Fit Generalized Additive Models (GAMs) using pygam.

models.GAMR(adata[, n_knots, distribution, ...])

Wrapper around R's mgcv package for fitting Generalized Additive Models (GAMs).

models.SKLearnModel(adata, model[, ...])

Wrapper around sklearn.base.BaseEstimator.



Development of the murine pancreas at E15.5 from [Bastidas-Ponce et al., 2019].


Regeneration of murine lung epithelial cells at 13 time points from [Strunz et al., 2020].

datasets.reprogramming_morris([subset, path])

Reprogramming of mouse embryonic fibroblasts to induced endoderm progenitors at 8 time points from [Biddy et al., 2018].

datasets.reprogramming_schiebinger([path, ...])

Reprogramming of mouse embryonic fibroblasts to induced pluripotent stem cells at 39 time points from [Schiebinger et al., 2019].


Zebrafish embryogenesis assayed using drop-seq, restricted to the axial mesoderm lineage from [Farrell et al., 2018].


Development of the murine pancreas at E15.5 from [Bastidas-Ponce et al., 2019], preprocessed according to the basic tutorial.


sc-RNA-seq dataset early human hematopoiesis (CD34+ bone marrow cells) assayed using 10X Chromium.