cellrank.tl.lineages

cellrank.tl.lineages(adata, backward=False, copy=False, return_estimator=False, **kwargs)[source]

Compute probabilistic lineage assignment using RNA velocity.

For each cell i in \({1, ..., N}\) and initial or terminal state j in \({1, ..., M}\), the probability is computed that cell i is either going to terminal state j (backward=False) or is coming from initial state j (backward=True).

This function computes the absorption probabilities of a Markov chain towards the initial or terminaltates uncovered by cellrank.tl.initial_states() or cellrank.tl.terminal_states() using a highly efficient implementation that scales to large cell numbers.

It’s also possible to calculate mean and variance of the time until absorption for all or just a subset of the initial or terminal states. This can be seen as a pseudotemporal measure, either towards any terminal population of the state change trajectory, or towards specific ones.

Parameters
Returns

Depending on copy and return_estimator, either updates the existing adata object, returns its copy or returns the estimator.

Return type

anndata.AnnData, cellrank.tl.estimators.BaseEstimator or None