scvelo.tl.velocity_clusters

scvelo.tl.velocity_clusters(data, vkey='velocity', match_with='clusters', sort_by='velocity_pseudotime', resolution=None, min_likelihood=None, copy=False)

Computes velocity clusters via louvain on velocities.

scv.tl.velocity_clusters(adata)
scv.pl.scatter(adata, color="velocity_clusters")
https://user-images.githubusercontent.com/31883718/69625627-484dc480-1047-11ea-847f-6607a3430427.png
Parameters:
  • data (AnnData) – Annotated data matrix.

  • vkey (str (default: ‘velocity’)) – Key of velocities computed in tl.velocity

  • match_with (str (default: ‘clusters’)) – The number of genes that appear in the returned tables.

  • match_with – Match the names of the velocity clusters with the names of this key (.obs).

  • sort_by (str or None (default: ‘dpt_pseudotime’)) – Sort velocity clusters by this key (.obs).

  • resolution (float (default: 0.7)) – Resolution for louvain modularity.

  • min_likelihood (float between 0 and 1 or None (default: None)) – Only rank velocity of genes with a likelihood higher than min_likelihood.

  • copy (bool (default: False)) – Return a copy instead of writing to data.

Returns:

velocity_clusters – Clusters obtained from applying louvain modularity on velocity expression.

Return type:

.obs