cellrank.pl.initial_states(adata, discrete=False, states=None, cluster_key=None, mode='embedding', time_key='latent_time', **kwargs)[source]

Plot initial states uncovered by cellrank.tl.initial_states.

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

  • discrete (bool) – If True, plot probability distribution of initial states. Only available when initial were estimated by cellrank.tl.estimators.GPCCA.

  • states (Union[str, Sequence[str], None]) – Subset of initial states to plot. If None, plot all initial states.

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

  • 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_terminal_states().


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

Return type