Add cell-cell expr-expr interaction pattern to a pair of cell types
Source:R/ExprSimulator.R
Add.Expr.Asso.Pattern.Rd
This function add cell-cell interactions to a pair of cell types (e.g. neuron-microglia) for expression in a cell type associated with expression of the neighboring other cell type. One can repeat this function for multiple times to add cell-cell interactions for many cell types.
Usage
Add.Expr.Asso.Pattern(
ppp.obj,
sim.count,
r,
perturbed.cell.type,
adjacent.cell.type,
Bidirectional = T,
int.dist.threshold = 0.1,
delta.mean = 1,
delta.sd = 0.001,
GenePairIDMatrix = 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. If simulated data do not have multiple regions, r=1.
- 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).
- Bidirectional
Whether the perturbation is both directional.
- 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
- GenePairIDMatrix
Affected gene pairs.
- 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