cellrank.pl.lineages(adata, lineages=None, backward=False, color=None, mode='embedding', time_key='latent_time', **kwargs)[source]

Plot lineages that were uncovered using cellrank.tl.lineages().

For each lineage, we show all cells in an embedding (default is UMAP) and color them by their probability of belonging to this lineage. For cells that are already committed, this probability will be one for their respective lineage and zero otherwise. For naive cells, these probabilities will be more balanced, reflecting the fact that naive cells have the potential to develop towards multiple endpoints.

  • adata (anndata.AnnData) – Annotated data object.

  • lineages (Union[str, Sequence[str], None]) – Plot only these lineages. If None, plot all lineages.

  • backward (bool) – Direction of the process.

  • color (Optional[str]) – If given, plot cluster annotations left of the lineage probabilities.

  • mode (Literal[‘embedding’, ‘time’]) –

    Valid options are:

    • ’embedding’ - plot the embedding while coloring in continuous or categorical observations.

    • ’time’ - plot the pseudotime on x-axis and the probabilities/memberships on y-axis.

  • time_key (str) – Key in adata.obs where the pseudotime is stored.

  • basis – Basis to use when mode = 'embedding'. If None, use ‘umap’.

  • kwargs (Any) – Keyword arguments for cellrank.tl.estimators.GPCCA.plot_absorption_probabilities().

Return type



Nothing, just plots the figure. Optionally saves it based on save.