lynx.trajectory.get_tree

lynx.trajectory.get_tree(adata, use_rep='X_z', n_nodes=20, ppt_lambda=10.0, seed=42, plot_graph=False)[source]

Compute a tree-like trajectory via elastic principal graph fitted onto the given manifold (adata.obsm[use_rep]). Principal graph params updated in-place: adata.uns[‘graph’]

Parameters:
  • adata (sc.AnnData) – AnnData of latent representation w/ computed elastic principal graph

  • use_rep (str) – Use the indicated representation. ‘X’ or any key for .obsm is valid.

  • n_nodes (int) – # principal nodes to infer Increase n_nodes get more localized principal manifold

  • plot_graph (bool) – Whether to plot the fitted principal graph onto the latent space (PCA proj.)

  • ppt_lambda (float)

  • seed (int)

Returns:

principal_graph – Fitted principal graph stored in adata.uns[‘graph’]

Return type:

dict