data: Synthetic single-cell, mixture and marker data

dataR Documentation

Synthetic single-cell, mixture and marker data

Description

mockSC/mockSP() 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

mockSC(ng = 200, nc = 50, nt = 3)

mockSP(x, ns = 100)

getMGS(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

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

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

  • getMGS 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 <- mockSC()
spe <- mockSP(sce)
mgs <- getMGS(sce)

MarcElosua/SPOTlight documentation built on March 7, 2024, 4:58 p.m.