API¶
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:
high level mode, essentially calling
cellrank.tl.terminal_states()
,cellrank.tl.initial_states()
andcellrank.tl.lineages()
. See our high level tutoriallow level mode, interacting directly with the kernels defined in
cellrank.tl.kernels.Kernel
and the estimatorscellrank.tl.estimators.GPCCA
orcellrank.tl.estimators.CFLARE
. The division into kernels and estimators ensures that CellRank in broadly applicable, no matter how you have computed your transition matrix. See our low level tutorial.
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()
.
Tools¶
This module offers a high-level API to compute cell fates and driver genes.
|
Compute a transition matrix based on a combination of RNA Velocity and transcriptomic similarity. |
|
Find initial states of a dynamic process of single cells based on RNA velocity [Manno18]. |
|
Find terminal states of a dynamic process of single cells based on RNA velocity [Manno18]. |
|
Compute probabilistic lineage assignment using RNA velocity. |
|
Compute driver genes per lineage. |
Kernels¶
Kernels are part of the low-level API and are used to estimate cell-to-cell transitions.
|
Kernel which computes a transition matrix based on RNA velocity. |
|
Kernel which computes transition probabilities based on transcriptomic similarities. |
|
Kernel which computes transition probabilities in a similar way to Palantir, see [Setty19]. |
Kernel which contains a precomputed transition matrix. |
Estimators¶
Estimators predict cell fates using the transitions derived from Kernels.
|
Generalized Perron Cluster Cluster Analysis [GPCCA18] as implemented in pyGPCCA. |
|
Clustering and Filtering of Left and Right Eigenvectors based on Markov chains. |
Plotting¶
|
Plot initial states uncovered by |
|
Plot terminal states uncovered by |
|
Plot lineages that were uncovered using |
|
Plot lineage drivers that were uncovered using |
|
Plot absorption probabilities on a circular embedding as done in [Velten17]. |
|
Plot gene expression trends along lineages. |
|
Plot a heatmap of smoothed gene expression along specified lineages. |
|
Cluster gene expression trends within a lineage and plot the clusters. |
|
Plot aggregate lineage probabilities at a cluster level. |
|
Plot a graph, visualizing incoming and outgoing edges or self-transitions. |
Utilities¶
|
Fit Generalized Additive Models (GAMs) using |
|
Wrapper around R’s mgcv package for fitting Generalized Additive Models (GAMs). |
|
Wrapper around |
|
Class representing an already fitted model. |
|
Model representing a failure of the original |
Reading¶
|
Read file and return |
Datasets¶
|
Development of the murine pancreas at E15.5 from [Panc19]. |
|
Regeneration of murine lung epithelial cells at 13 time points from [Lung20]. |
|
Reprogramming of mouse embryonic fibroblasts to induced endoderm progenitors at 8 time points from [Morris18]. |
|
Development of the murine pancreas at E15.5 from [Panc19], preprocessed according to the basic tutorial. |