scFates.tl.cleanup

scFates.tl.cleanup(adata, minbranchlength=3, leaves=None, copy=False)

Remove spurious branches from the tree.

Parameters
adata : AnnData

Annotated data matrix.

minbranchlength : int (default: 3)

Branches having less than the defined amount of nodes are discarded

leaves : int | NoneOptional[int] (default: None)

Manually select branch tips to remove

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’][‘B’]

subsetted adjacency matrix of the principal points.

.uns[‘graph’][‘R’]

subsetted updated soft assignment of cells to principal point in representation space.

.uns[‘graph’][‘F’]

subsetted coordinates of principal points in representation space.

Return type

anndata.AnnData