scFates.tl.roots

scFates.tl.roots(adata, roots, meeting, copy=False)

Define 2 roots of the tree.

Parameters
adata : AnnData

Annotated data matrix.

roots

list of tips or forks to be considered a roots.

meeting

node ID of the meeting point fo the two converging paths.

copy : bool (default: False)

Return a copy instead of writing to adata.

Returns

adata – if copy=True it returns or else add fields to adata:

.uns[‘graph’][‘root’]

farthest root selected.

.uns[‘graph’][‘root2’]

2nd root selected.

.uns[‘graph’][‘meeting’]

meeting point on the tree.

.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