tangram.utils.deconvolve_cell_annotations
- tangram.utils.deconvolve_cell_annotations(adata_sp, filter_cell_annotation=None)
Assigns cell annotation to each segmented cell. Produces an AnnData structure that saves the assignment in its obs dataframe.
- Parameters
adata_sp (AnnData) – Spatial AnnData structure.
filter_cell_annotation (sequence) – Optional. Sequence of cell annotation names to be considered for deconvolution. Default is None. When no values passed, all cell annotation names in adata_sp.obsm[“tangram_ct_pred”] will be used.
- Returns
Saves the cell annotation assignment result in its obs dataframe where each row representing a segmentation object, column ‘x’, ‘y’, ‘centroids’ contain its position and column ‘cluster’ is the assigned cell annotation.
- Return type
AnnData