cospar.pl.fate_potency

cospar.pl.fate_potency(adata, source='transition_map', selected_times=None, background=True, show_histogram=False, auto_color_scale=True, color_bar=True, figure_index='', mask=None, color_map=<matplotlib.colors.LinearSegmentedColormap object>, **kwargs)

Plot fate potency.

The results should be pre-computed from cospar.tl.fate_potency().

Parameters
adata : AnnData object

Assume to contain transition maps at adata.uns.

source : str

The transition map to be used for plotting: {‘transition_map’, ‘intraclone_transition_map’,…}. The actual available map depends on adata itself, which can be accessed at adata.uns[‘available_map’]

selected_times : list, optional (default: all)

A list of time points to further restrict the cell states to plot. The default choice is not to constrain the cell states to show.

background : bool, optional (default: True)

If true, plot all cell states (t1+t2) in grey as the background.

show_histogram : bool, optional (default: False)

If true, show the distribution of inferred fate probability.

color_bar : bool, optional (default: True)

plot the color bar if True.

auto_color_scale

True: automatically rescale the color range to match the value range.

figure_index : str, optional (default: ‘’)

String index for annotate filename for saved figures. Used to distinuigh plots from different conditions.

mask : np.array, optional (default: None)

A boolean array for available cell states. It should has the length as adata.shape[0]. Especially useful to constrain the states to show fate bias.

color_map

The color map (a matplotlib.pyplot.cm object) to visualize the result.