Skip to contents

This function takes a list object containing spatial transcriptomics matrix as input and estimates the relative number of cells per spot in the data. The number of cells is estimated as the library size scaled to the range from 1 to 100. This value stored in the number_cells attribute.

Usage

get_num_cell_per_spot(alldata)

Arguments

alldata

A list object containing spatial transcriptomics

Value

a vector with the relative number of cells in each spot.

Examples


utils::data("example_scrnaseq" , package = "scFeatures")
data <- example_scrnaseq@assays$RNA@data
data <- list(data = data)
number_of_cells <- get_num_cell_per_spot(data)