get_num_cell_per_spot: Estimate a relative number of cells per spot for spatial...

View source: R/utils.R

get_num_cell_per_spotR Documentation

Estimate a relative number of cells per spot for spatial transcriptomics data

Description

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)



SydneyBioX/scFeatures documentation built on Nov. 30, 2024, 6:40 p.m.