dynamo.pd.state_graph(adata, group, approx=True, basis='umap', layer=None, arc_sample=False, sample_num=100)[source]

Estimate the transition probability between cell types using method of vector field integrations.

  • adata (AnnData) – AnnData object that will be used to calculate a cell type (group) transition graph.

  • group (str) – The attribute to group cells (column names in the adata.obs).

  • approx (bool (default: False)) – Whether to use streamplot to get the integration lines from each cell.

  • basis (str or None (default: umap)) – The embedding data to use for predicting cell fate. If basis is either umap or pca, the reconstructed trajectory will be projected back to high dimensional space via the inverse_transform function.

  • layer (str or None (default: None)) – Which layer of the data will be used for predicting cell fate with the reconstructed vector field function. The layer once provided, will override the basis argument and then predicting cell fate in high dimensional space.

  • sample_num (int (default: 100)) – The number of cells to sample in each group that will be used for calculating the transitoin graph between cell groups. This is required for facilitating the calculation.


  • An updated adata object that is added with the group + ‘_graph’ key, including the transition graph

  • and the average transition time.