Moving to CellRank 2¶
The original CellRank version (v1) [Lange et al., 2022] was a framework to analyze cellular dynamics based on RNA velocity
[Bergen et al., 2020, La Manno et al., 2018] and gene expression similarity. Based on a
Markov chain formulation, it combined these two data modalities
in a high-dimensional space and used the GPCCA algorithm
[Reuter et al., 2022, Reuter et al., 2018]
to compute initial and terminal states, fate probabilities, and driver genes.
With version 2, we are generalizing CellRank beyond RNA velocity data and turn it into a general framework for single-cell fate mapping based on various data modalities (see About CellRank). This required us to make substantial changes to CellRank’s API, many of which are backward-compatibility breaking. CellRank 2 can do everything that version 1 could do (and much more); however, it does it differently.
Important
We outline the most important changes here. For a more detailed account, please refer to the Release Notes.
Important changes in version 2¶
Deprecation of high level
cellrank.tl
functions, includingcellrank.tl.terminal_states
andcellrank.tl.lineages
: we realized that this mode of interacting with CellRank is not flexible enough to accommodate various data modalities and analysis paradigms. Thus, we switched to a more modular structure:cellrank.kernels
to compute cell-cell transition matrices, andcellrank.estimators
to compute initial and terminal states, fate probabilities, and more. See Getting Started with CellRank.Introduction of a
fit()
/predict()
workflow for estimators: given that we removed the oldcellrank.tl
high-level functions, we wanted to make it easier to interact with estimators. Thus, everyestimator
now has a.fit
method, which computes macrostates, and a.predict
method, which classifies some of these as terminal states. The newfit()
/predict()
workflow complements our fully-flexible low-level mode of interacting with estimators. See Computing Initial and Terminal States.Renaming of
absorption_probabilities
tofate_probabilities
everywhere, for example incompute_fate_probabilities()
: while we still compute absorption probabilities on the Markov chain under the hood, we realized that the term is somewhat technical and decided to replace it with the more intuitive “fate probabilities”. See Estimating Fate Probabilities and Driver Genes.Removal of the
cellrank.external
: anyone wishing to contribute to CellRank can do this now directly viacellrank.kernels
andcellrank.estimators
. We welcome any contribution to CellRank, see our contribution guide, and feel free to get in touch via an issue or email.Replacement of the old
cellrank.external.WOTKernel
with a newcellrank.kernels.RealTimeKernel
: this is CellRank’s interface withmoscot
, enabling us to analyze large-scale time-course studies with additional spatial or lineage readout [Klein et al., 2023, Lange et al., 2023]. In addition, theRealTimeKernel
interfaces with Waddington-OT [Schiebinger et al., 2019].
There are many more changes and improvements in CellRank 2. For example, the computation of fate probabilities is 30x faster compared to version 1, we fixed many bugs, and improved and extended our documentation and tutorials.