Skip to contents

This function generates cell locations for all regions.

Usage

cell.loc.fc(
  N,
  win,
  cell.prop,
  cell.inh.attr.input = NULL,
  same.dis.cutoff = 0,
  even.distribution.coef = 0,
  grid.size.small = 19,
  grid.size.large = 45,
  seed
)

Arguments

N

No. of cells to generate.

win

Spatial window within which cells will be generated.

cell.prop

Proportion of cell in each cell type to generated for each region.

cell.inh.attr.input

(Default=NULL). A matrix providing cell-cell location attraction and inhibition parameters. Example input is like: cell.inh.attr.input= cbind(Cell1=c("A", "B", "C"), Cell2=c("B","D","E), Strength= c(2, 0, -2)).

same.dis.cutoff

(Default = 0) Cells with distance less than this cutoff will be considered as overlapping cells non-realistic in real ST data, and only one will be kept.

even.distribution.coef

(Default =0). The higher the value, the more we require evenly distributed locations of cells, as opposed to randomly generated locations (Poisson process).

grid.size.small

(Default =19). If some levels of even distributions of cells are imposed, this parameter is needed to cut the simulation window into grids of different sizes to smooth cell densities.

grid.size.large

(Default =45). If some levels of even distributions of cells are imposed, this parameter is needed to cut the simulation window into grids of different sizes to smooth cell densities.

seed

Random seed

Value

Cell location