scvelo.tl.terminal_states

scvelo.tl.terminal_states(data, vkey='velocity', groupby=None, groups=None, self_transitions=False, basis=None, weight_diffusion=0, scale_diffusion=1, eps=0.001, copy=False)

Computes terminal states (root and end points).

Parameters:
data : AnnData

Annotated data matrix.

vkey : str (default: ‘velocity’)

Name of velocity estimates to be used.

groupby : str, list or np.ndarray (default: None)

Key of observations grouping to consider.

groups : str, list or np.ndarray (default: None)

Groups selected to find terminal states on. Must be an element of adata.obs[groupby].

self_transitions : bool (default: False)

Allow transitions from one node to itself.

basis : str (default: None)

Basis to use.

weight_diffusion : float (default: 0)

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

scale_diffusion : float (default: 1)

Scale of diffusion kernel.

eps : float (default: 1e-3)

Tolerance for eigenvalue selection.

copy : bool (default: False)

Return a copy instead of writing to data.

Returns:

  • Returns or updates data with the attributes
  • root (.obs) – sparse matrix with transition probabilities.
  • end (.obs) – sparse matrix with transition probabilities.