Skip to contents

.mock_sc/sp() are designed to generate synthetic single-cell and spatial mixture data. These data are not meant to represent biologically meaningful use-cases, but are solely intended for use in examples, for unit-testing, and to demonstrate SPOTlight's general functionality. Finally, .get_mgs() implements a statistically naive way to select markers from single-cell data; again, please don't use it in real life.

Usage

.mock_sc(ng = 200, nc = 50, nt = 3)

.mock_sp(x, ns = 100)

.get_mgs(x, n_top = 10)

Arguments

ng, nc, nt, ns

integer scalar specifying the number of genes, cells, types (groups) and spots to simulate.

x

Single cell experiment object ç

n_top

integer specifying the number of marker genes to extract for each cluster.

Value

  • .mock_sc returns a SingleCellExperiment with rows = genes, columns = single cells, and cell metadata (colData) column type containing group identifiers.

  • .mock_sp returns a SingleCellExperiment with rows = genes, columns = single cells, and cell metadata (colData) column type containing group identifiers.

  • .get_mgs returns a data.frame with nt*n_top rows and 3 columns: gene and type (group) identifier, as well as the gene's weight = the proportion of counts accounted for by that type.

Examples

sce <- .mock_sc()
spe <- .mock_sp(sce)
mgs <- .get_mgs(sce)