computeCommunProb: Compute the communication probability/strength between any...

View source: R/modeling.R

computeCommunProbR Documentation

Compute the communication probability/strength between any interacting cell groups

Description

To further speed up on large-scale datasets, USER can downsample the data using the function 'subset' from Seurat package (e.g., pbmc.small <- subset(pbmc, downsample = 500)), or using the function 'sketchData' from CellChat, in particular for the large cell clusters;

Usage

computeCommunProb(
  object,
  type = c("triMean", "truncatedMean", "thresholdedMean", "median"),
  trim = 0.1,
  LR.use = NULL,
  raw.use = TRUE,
  population.size = FALSE,
  distance.use = TRUE,
  interaction.length = 200,
  scale.distance = 0.01,
  k.min = 10,
  nboot = 100,
  seed.use = 1L,
  Kh = 0.5,
  n = 1
)

Arguments

object

CellChat object

type

methods for computing the average gene expression per cell group. By default = "triMean", producing fewer but stronger interactions; When setting ‘type = "truncatedMean"', a value should be assigned to ’trim', producing more interactions.

trim

the fraction (0 to 0.25) of observations to be trimmed from each end of x before the mean is computed

LR.use

a subset of ligand-receptor interactions used in inferring communication network

raw.use

whether use the raw data (i.e., 'object@data.signaling') or the projected data (i.e., 'object@data.project'). Set raw.use = FALSE to use the projected data when analyzing single-cell data with shallow sequencing depth because the projected data could help to reduce the dropout effects of signaling genes, in particular for possible zero expression of subunits of ligands/receptors.

population.size

whether consider the proportion of cells in each group across all sequenced cells. Set population.size = FALSE if analyzing sorting-enriched single cells, to remove the potential artifact of population size. Set population.size = TRUE if analyzing unsorted single-cell transcriptomes, with the reason that abundant cell populations tend to send collectively stronger signals than the rare cell populations.

Parameters for spatial data analysis

distance.use

whether use distance constraints to compute communication probability. distance.use = FALSE will only filter out interactions between spatially distant regions, but not add distance constraints.

interaction.length

The maximum interaction/diffusion length of ligands (Unit: microns). This hard threshold is used to filter out the connections between spatially distant regions

scale.distance

A scale or normalization factor for the spatial distances. This values can be 1, 0.1, 0.01, 0.001. We choose this values such that the minimum value of the scaled distances is in [1,2].

When comparing communication across different CellChat objects, the same scale factor should be used. For a single CellChat analysis, different scale factors will not affect the ranking of the signaling based on their interaction strength.

k.min

the minimum number of interacting cell pairs required for defining adjacent cell groups

nboot

threshold of p-values

seed.use

set a random seed. By default, set the seed to 1.

Kh

parameter in Hill function

n

parameter in Hill function

Value

A CellChat object with updated slot 'net':

object@net$prob is the inferred communication probability (strength) array, where the first, second and third dimensions represent a source, target and ligand-receptor pair, respectively.

USER can access all the inferred cell-cell communications using the function 'subsetCommunication(object)', which returns a data frame.

object@net$pval is the corresponding p-values of each interaction


sqjin/CellChat documentation built on Nov. 10, 2023, 4:29 a.m.