cospar.tl.progenitor

cospar.tl.progenitor(adata, selected_fates=None, source='transition_map', map_backward=True, method='norm-sum', bias_threshold_A=0.5, bias_threshold_B=0.5, sum_fate_prob_thresh=0, pseudo_count=0, avoid_target_states=False)

Identify trajectories towards/from two given clusters.

Given fate bias \(Q_i\) for a state \(i\) as defined in fate_bias(), the selected ancestor population satisfies:

  • \(P_i(\mathcal{A})+P_i(\mathcal{B})\) > sum_fate_prob_thresh;

  • Ancestor population for fate \(\mathcal{A}\) satisfies \(Q_i\) > bias_threshold_A

  • Ancestor population for fate \(\mathcal{B}\) satisfies \(Q_i\) < bias_threshold_B

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.

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

bias_threshold_A : float, optional (default: 0), range: (0,1)

The threshold for selecting ancestor population for fate A.

bias_threshold_B : float, optional (default: 0), range: (0,1)

The threshold for selecting ancestor population for fate B.

sum_fate_prob_thresh : float, optional (default: 0), range: (0,1)

Minimum cumulative probability towards joint cluster (A,B) to qualify for ancestor selection.

pseudo_count : float, optional (default: 0)

Pseudo count to compute the fate bias. The bias = (Pa+c0)/(Pa+Pb+2*c0), where c0=pseudo_count*(maximum fate probability) is a rescaled pseudo count.

avoid_target_states

If True, exclude target states for computing fate bias.

Returns

Results saved at adata.obs[f’progenitor_{source}_{fate_name}’] and adata.obs[f’diff_trajectory_{source}_{fate_name}’]”