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

Perform automatic assignment on tips only.

min_val

Perform automatic assignment using minimum value instead.

layer

If key is in X, choose which layer to use for the averaging.

copy

Return a copy instead of writing to adata.

Returns

adata – 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.

Return type

anndata.AnnData