dynamo.tl.stationary_distribution

dynamo.tl.stationary_distribution(adata, method='kmc', direction='both', calc_rnd=True)[source]

Compute stationary distribution of cells using the transition matrix.

Parameters
  • adata (AnnData) – an Annodata object

  • method (str (default: kmc)) – The method to calculate the stationary distribution.

  • direction (str (default: both)) – The direction of diffusion for calculating the stationary distribution, can be one of both, forward, backward.

  • calc_rnd (bool (default: True)) – Whether to also calculate the stationary distribution from the control randomized transition matrix.

Returns

Adata – Returns an updated ~anndata.AnnData with source, sink stationary distributions and the randomized results, depending on the direction and calc_rnd arguments.

Return type

AnnData