Skip to content

Directly infer cell cell communication skiping deconvolution

Shao, Xin edited this page May 29, 2022 · 1 revision

For single-cell ST data with known cell types

[1] Use createSpaTalk() to create SpaTalk object by defining the celltype

[2] Use find_lr_path() and dec_cci() or dec_cci_all()

Example

# load demo data
load(paste0(system.file(package = 'SpaTalk'), "/extdata/starmap_data.rda"))
load(paste0(system.file(package = 'SpaTalk'), "/extdata/starmap_meta.rda"))
# create SpaTalk data
obj <- createSpaTalk(st_data = as.matrix(starmap_data),
                     st_meta = starmap_meta[, -4],
                     species = "Mouse",
                     if_st_is_sc = T,
                     spot_max_cell = 1,
                     celltype = starmap_meta$celltype)
# Filter LRIs with downstream targets
obj <- find_lr_path(object = obj, lrpairs = lrpairs, pathways = pathways)
# Infer cell-cell communications from SST to PVALB neurons
obj <- dec_cci(object = obj, 
               celltype_sender = 'eL5',
               celltype_receiver = 'Astro')

# Infer all cell-cell communications
# obj <- dec_cci_all(object = obj)