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.
Update the AnnData object with source, sink stationary distributions and the randomized results, depending on the direction and calc_rnd arguments.
- Parameters:
adata (
AnnData) – An AnnData object.method (
str(default:'kmc')) – The method to calculate the stationary distribution. Defaults to “kmc”.direction (
Literal['both','forward','backward'] (default:'both')) – The direction of diffusion for calculating the stationary distribution, can be one of both, forward, backward. Defaults to “both”.calc_rnd (
bool(default:True)) – Whether to also calculate the stationary distribution from the control randomized transition matrix. Defaults to True.
- Return type: