cospar.tl.fate_potency

cospar.tl.fate_potency(adata, selected_fates=None, source='transition_map', map_backward=True, method='norm-sum', fate_count=False)

Quantify how multi-potent a cell state is.

It runs fate_map() to compute the fate potency. Please see all parameter definitions there.

Parameters
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’]

map_backward : bool, optional (default: True)

If map_backward=True, show fate properties of initial cell states \(i\); otherwise, show progenitor properties of later cell states \(j\). This is used for building the fate map \(P_i(\mathcal{C})\). See fate_map().

method : str, optional (default: ‘norm-sum’)

Method to obtain the fate probability map \(P_i(\mathcal{C})\) towards a set of states annotated with fate \(\mathcal{C}\). Available options: {‘sum’, ‘norm-sum’}. See fate_map().

fate_count

True: count the number of possible fates; otherwise, use the Shannon entropy.

Returns

Results saved at adata.obs[f”fate_potency_{source}”].