- CFLARE.set_terminal_states(labels, cluster_key=None, add_to_existing=False, **kwargs)¶
Manually define terminal states.
Defines the terminal states. Valid options are:
pandas.Serieswhere each category corresponds to a terminal state. NaN entries denote cells that do not belong to any terminal state, i.e. these are either initial or transient cells.
dictwhere keys are terminal states and values are lists of cell barcodes corresponding to annotations in
adata.AnnData.obs_names. If only 1 key is provided, values should correspond to terminal state clusters if a categorical
pandas.Seriescan be found in
str]) – Key in
anndata.AnnData.obsin order to associate names and colors with
terminal_states. Each terminal state will be given the name and color corresponding to the cluster it mostly overlaps with.
bool) – Whether the new terminal states should be added to pre-existing ones. Cells already assigned to a terminal state will be re-assigned to the new terminal state if there’s a conflict between old and new annotations. This throws an error if no previous annotations corresponding to terminal states have been found.
- Return type
Nothing, just updates the following fields: