Adds spatial differential expressed pattern (region-specific effects) to a cell type.
Source:R/ExprSimulator.R
Add.Spatial.Expr.Pattern.RdThis 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
Simulated expression counts from single-cell expression data, before adding in additional spatial patterns.
- r
Which region to add in the spatial pattern.
- CellType
Which cell type to add in the spatial pattern.
- 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
Expected effect size (at the log scale of the counts).
- delta.sd
Standard deviation of the effect size.
- seed
Seed