cellrank.pl.lineages

cellrank.pl.lineages(adata, lineages=None, backward=False, cluster_key=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.

Parameters
  • 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.

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

  • mode (str) –

    Can be either ‘embedding’ or ‘time’:

    • ’embedding’ - plot the embedding while coloring in the absorption probabilities.

    • ’time’ - plot the pseudotime on x-axis and the absorption probabilities 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 – Keyword arguments for cellrank.tl.estimators.BaseEstimator.plot_absorption_probabilities().

Returns

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

Return type

None