Skip to contents

This function adds one type of spatial differential expressed patterns. This function can be repeated used to add region-specific effects in different regions for different cell types.

Usage

Add.Spatial.Expr.Pattern(
  sim.count,
  r,
  CellType,
  GeneID = NULL,
  PropOfGenes = 0.1,
  delta.mean = 1,
  delta.sd = 0.01,
  seed
)

Arguments

sim.count

Cells as points on a spatial map.

r

Region index.

CellType

Cell type index.

GeneID

Gene(s) index. Default = NULL, and then a random subset of genes will be perturbed based on the defined spatial patterns.

PropOfGenes

Proportion of genes with this pattern if GeneID is not provided.

delta.mean

Mean effect (on the log count scale).

delta.sd

SD of effect.

seed

Seed

Value

SignalSummary:

Summary of this spatial pattern, including the type of spatial patterns, impacted cell types, perturbed genes, and effect sizes.

beta.matrix:

Effect size on each gene in each cell.