mockSVG: Generate count matrix for spatially variable genes.

View source: R/mock.R

mockSVGR Documentation

Generate count matrix for spatially variable genes.

Description

Generate count matrix for spatially variable genes.

Usage

mockSVG(size, tot_genes, de_genes, return_SPE = FALSE)

Arguments

size

An integer scalar. Cells will be spatially arranged on a ⁠size x size⁠ grid. Default: 10, corresponding to 100 cells.

tot_genes

An integer scalar. Total number of genes. Default: 1000.

de_genes

An integer scaler. The number of spatially variable genes. Default: 100.

return_SPE

A logical, whether to return result as a SpatialExperiment. Default: FALSE.

Value

If return_SPE = TRUE, returns a SpatialExperiment object.

If not, a list containing:

  • coordinates: data.frame with x and y columns;

  • counts: matrix with generated gene counts.

Examples

spe <- mockSVG(size = 20, tot_genes = 3, de_genes = 1, return_SPE = TRUE)
spe


sales-lab/spatialDE documentation built on Feb. 12, 2024, 2:47 p.m.