scvelo.tl.transition_matrix

scvelo.tl.transition_matrix(adata, vkey='velocity', basis=None, backward=False, self_transitions=True, scale=10, perc=None, use_negative_cosines=False, weight_diffusion=0, scale_diffusion=1, weight_indirect_neighbors=None, n_neighbors=None, vgraph=None)

Computes transition probabilities from velocity graph

Parameters:
adata : AnnData

Annotated data matrix.

vkey : str (default: ‘velocity’)

Name of velocity estimates to be used.

basis : str or None (default: None)

Restrict transition to embedding if specified

backward : bool (default: False)

Whether to use the transition matrix to push forward (False) or to pull backward (True)

self_transitions : bool (default: False)

Allow transitions from one node to itself.

scale : float (default: 10)

Scale parameter of gaussian kernel.

perc : float between 0 and 100 or None (default: None)

Determines threshold of transitions to include.

use_negative_cosines : bool (default: False)

If True, negatively similar transitions are taken into account.

weight_diffusion : float (default: 0)

Relative weight to be given to diffusion kernel (Brownian motion)

scale_diffusion : float (default: 1)

Scale of diffusion kernel.

weight_indirect_neighbors : float between 0 and 1 or None (default: None)

Weight to be assigned to indirect neighbors (i.e. neighbors of higher degrees).

n_neighbors : int (default: None)

Number of nearest neighbors to consider around each cell.

vgraph : csr matrix or None (default: None)

Sparse velocity graph representation to use instead of adata.uns[vkey + ‘_graph’].

Returns:

Returns sparse matrix with transition probabilities.