atlas.pl.plot_fate_probabilities

atlas.pl.plot_fate_probabilities#

atlas.pl.plot_fate_probabilities(mudata, embedding_key='X_umap', fate_probability_key='fate_probabilities', states=None, cmap='viridis', title='Fate Probabilities', save=None, **kwargs)#

Plot lineage fate probabilities on a low-dimensional embedding.

This function visualizes fate probabilities similarly to [LBK+22], by projecting them onto a specified embedding (such as UMAP). Cells are colored using lineage-specific gradients, allowing inspection of differentiation trajectories.

Parameters:
  • mudata (MuData) – MuData object.

  • embedding_key (str (default: 'X_umap')) – Key in mudata.obsm specifying the embedding to use for visualization (e.g. "X_umap", "X_pca").

  • fate_probability_key (str (default: 'fate_probabilities')) – Key in mudata.obsm containing a DataFrame of fate probabilities.

  • states (str | Sequence[str] | None (default: None)) – Subset of terminal states (lineages) to visualize. Can be a single string or a sequence of strings. If None, all available states are plotted.

  • cmap (str (default: 'viridis')) – Colormap used for visualizing fate probabilities.

  • title (str (default: 'Fate Probabilities')) – Title of the plot.

  • save (bool | str | None (default: None)) – If True, save the figure using scvelo defaults. If a string, specifies the filename. If None, the plot is not saved.

  • **kwargs – Additional keyword arguments passed to scvelo.pl.scatter().

Warns:
  • UserWarning – If fate_probability_key is not found in mudata.obsm.

  • UserWarning – If embedding_key is not found in mudata.obsm.

  • UserWarning – If no valid terminal states are selected.

Return type:

None