diffusion pseudotime

Infer progression of cells through geodesic distance along the graph [Haghverdi16]_ [Wolf19]_.

Parameters

algorithm: str Clustering algorithm to use as embedding.


root: int | str This is the index of the root node or a list of root node indices. use this node as the root cell for diffusion pseudotime.


Web view

diffusion_pseudotime_screenshot diffusion_pseudotime_screenshot

Python equivalent

import scanpy as sc

sc.tl.louvain(adata)
adata.uns['iroot'] = np.flatnonzero(adata.obs['louvain'] == '16')[0]
sc.tl.dpt(adata)
sc.pl.draw_graph(adata, color=['louvain', 'dpt_pseudotime'], legend_loc='on data', cmap='viridis')