scFates.tl.subset_tree¶
- scFates.tl.subset_tree(adata, root_milestone=None, milestones=None, mode='extract', t_min=None, t_max=None, copy=False)¶
Subset the fitted tree.
if pseudotime parameter used, cutoff tree by removing cells/nodes after or before defined pseudotime.
- Parameters
- adata :
AnnData
Annotated data matrix.
- root_milestone :
str
|None
Optional
[str
] (default:None
) tip defining progenitor branch.
- milestones :
Iterable
|None
Optional
[Iterable
] (default:None
) tips defining the progenies branches.
- mode : {‘extract’, ‘substract’, ‘pseudotime’}
Literal
[‘extract’, ‘substract’, ‘pseudotime’] (default:'extract'
) whether to substract or extract the mentionned path.
- copy :
bool
(default:False
) Return a copy instead of writing to adata.
- adata :
- Returns
adata – subsetted dataset if copy=True it returns or else subsets these 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.
- .obs[‘old_milestones’]
previous milestones from initial tree.
- Return type