cospar.pl.progenitor

cospar.pl.progenitor(adata, selected_fates=None, source='transition_map', selected_times=None, background=True, plot_target_state=False, auto_color_scale=False, target_transparency=0.2, figure_index='', mask=None, **kwargs)

Plot the progenitors of given fate clusters.

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

Parameters
adata : AnnData object

Assume to contain transition maps at adata.uns.

selected_fates : list

List of cluster ids consistent with adata.obs[‘state_info’]. It allows a nested structure. If so, we merge clusters within each sub-list into a mega-fate cluster.

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.

plot_target_state

If True, plot target states.

auto_color_scale

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

target_transparency : float, optional (default: 0.2)

It controls the transparency of the plotted target cell states, for visual effect. Range: [0,1].

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.