Estimate the number of cells in each ST spot based on total
RNA content and an expected mean cell count.
Usage
estimate_cells_per_spot(st_data, mean_cells = 5, min_cells = 1)
Arguments
- st_data
Spatial expression matrix (genes x spots).
- mean_cells
Expected mean number of cells per spot. Default is 5
(appropriate for 10x Visium).
- min_cells
Minimum cells per spot. Default is 1.
Value
An integer vector of estimated cell counts per spot.
Details
The estimation uses a linear model relating total normalized expression
to cell counts, anchored at the minimum and mean values.
Examples
if (FALSE) { # \dontrun{
cell_counts <- estimate_cells_per_spot(st_expr, mean_cells = 5)
} # }