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\)