This function computes the number of cells in each cell type by multiplying the cell type probability in each spot with the relative number of cells in each spot. The relative number of cells are estimated using library size of each spot. See get_num_cell_per_spot().

get_num_cell_per_celltype(data)

Arguments

data

a spatial transcriptomics dataset in the form of a Seurat object.

Value

A matrix with the number of cells per cell type at each spot.