Skip to contents

Compute ligand-receptor interactions (LRscore) between neighboring spots. Neighboring spots are those with norm.d < spot_dist_cutoff.

Usage

compute_spatial_ccc_tbl(
  spe,
  assay_name = "logcounts",
  ligand,
  receptor,
  expression_min_prop = 0.05,
  spot_dist = calc_spot_dist(spe),
  spot_dist_cutoff = 1.5,
  LRscore_cutoff = 0.5
)

Arguments

spe

SpatialExperiment object

assay_name

assay name in string

ligand

ligand

receptor

receptor

expression_min_prop

minimum proportion of samples with non-zero expression value (default: 0.05)

spot_dist

distances between spots, an output of calc_spot_dist()

spot_dist_cutoff

cutoff value for norm.d in spot distances. Default cutoff is 1.5 and it comes from sqrt(3) ~ 1.73, based on how Visium spot-array is arranged, so by default, only computing nearest neighbors.

LRscore_cutoff

minimum LRscore to keep

Value

LRscore table in data.frame with the following columns:

src, dst

source and destination cells/spots

d, norm.d

cell-cell/spot-spot distance and normalized distance

ligand, receptor

ligand & receptor genes

LRscore

LRscore -- see above

weight

weight -- reciprocal of norm.d

WLRscore

weighted LRscore = \(weight \cdot LRscore\)

Details

$$LRscore = \frac{\sqrt{x_L \cdot x_R}}{\sqrt{x_L \cdot x_R} + C}$$

where \(x_L\) and \(x_R\) are expression values of ligand (L) and receptor (R), and \(C\) is the average gene expression across all genes and all samples.

source: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7261168/