Add cell-cell expr-distance interaction to a pair of cell types
Source:R/ExprSimulator.R
Add.Distance.Asso.Pattern.Rd
This function add a type of cell-cell interactions to a pair of cell types: the expression in a cell type associated with the proximity of the other cell type. One can repeat this function for multiple times to add cell-cell interactions for many cell type pairs and regions.
Usage
Add.Distance.Asso.Pattern(
ppp.obj,
sim.count,
r,
perturbed.cell.type,
adjacent.cell.type,
int.dist.threshold = 0.1,
delta.mean = 1,
delta.sd = 0.001,
GeneID = NULL,
PropOfGenes = NULL,
seed = NULL
)
Arguments
- ppp.obj
An object of class "ppp" representing simulated cell locations
- 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.
- perturbed.cell.type
Which cell type is perturbed from this cell-cell interaction (e.g. microglia).
- adjacent.cell.type
Which cell type in the neighbor perturbs from the cell-cell interaction (e.g. neuron).
- int.dist.threshold
The minimal cell-cell distance for the interaction.
- delta.mean
Expected effect.size (at the log scale of the counts).
- delta.sd
Standard deviation of the effect.size
- GeneID
Affected genes.
- PropOfGenes
Proportion of genes impacted by the cell-cell interaction. It is used if GenePairIDMatrix is NULL, and a random subset of genes with specified proportion will be perturbed.
- seed
Seed