scFates.tl.root#
- scFates.tl.root(adata, root, tips_only=False, min_val=False, layer=None, copy=False)#
Define the root of the trajectory.
- Parameters:
- adata
Annotated data matrix.
- root
Either an Id (int) of the tip of the fork to be considered as a root. Or a key (str) from obs/X (such as CytoTRACE) for automatic selection.
- tips_only default:
False Perform automatic assignment on tips only.
- min_val default:
False Perform automatic assignment using minimum value instead.
- layer default:
None If key is in X, choose which layer to use for the averaging.
- copy default:
False Return a copy instead of writing to adata.
- Returns:
adata : anndata.AnnData if copy=True it returns or else add fields to adata:
- .uns[‘graph’][‘root’]
selected root.
- .uns[‘graph’][‘pp_info’]
for each PP, its distance vs root and segment assignment.
- .uns[‘graph’][‘pp_seg’]
segments network information.