Skip to contents

Knowledge-Graph-Based Cell-Cell Communication Inference for Spatially Resolved Transcriptomic Data

Note: This repository is maintained by Zaoqu Liu. For the original version, please visit ZJUFanLab/SpaTalk.

Overview

SpaTalk is a computational framework for inferring spatially resolved cell-cell communications (CCIs) from spatial transcriptomics (ST) data. The method integrates graph network modeling and knowledge graph approaches to reconstruct ligand-receptor-target signaling networks between spatially proximal cells.

Key Methodological Features

  • Cell-type Deconvolution: Non-negative linear model (NNLM) for decomposing spot-based ST data into single-cell resolution
  • Spatial Mapping: Integration of scRNA-seq reference data with spatial coordinates
  • Graph-based CCI Inference: Knowledge graph modeling of ligand-receptor-downstream pathway interactions
  • Statistical Validation: Permutation-based significance testing for identified communications

Supported Data Types

Platform Resolution Examples
Single-cell ST Cellular STARmap, MERFISH, seqFISH+
Spot-based ST Multi-cellular 10x Visium, Slide-seq, ST

Installation

install.packages("SpaTalk", repos = "https://zaoqu-liu.r-universe.dev")

From GitHub

# Install dependencies
install.packages("devtools")
devtools::install_github("linxihui/NNLM")

# Install SpaTalk
devtools::install_github("Zaoqu-Liu/SpaTalk")

System Requirements

  • R ≥ 4.0.0
  • Platform: Windows, macOS, Linux
  • Dependencies: Seurat (≥3.0.0), NNLM, Matrix, Rcpp

Quick Start

1. Create SpaTalk Object

library(SpaTalk)

# For spot-based ST data
obj <- createSpaTalk(
  st_data = st_counts,      # Gene × Spot count matrix
  st_meta = st_coordinates, # Data frame with 'spot', 'x', 'y'
  species = "Human",        # "Human" or "Mouse"
  if_st_is_sc = FALSE,
  spot_max_cell = 10        # Expected cells per spot
)

2. Cell-type Deconvolution

# Using built-in NNLM deconvolution
obj <- dec_celltype(
  obj, 
  sc_data = sc_counts,       # scRNA-seq reference

  sc_celltype = cell_labels  # Cell type annotations
)

3. Infer Cell-Cell Communications

# Load curated databases
data(lrpairs)   # Ligand-receptor pairs from CellTalkDB
data(pathways)  # KEGG/Reactome pathways + AnimalTFDB

# Filter LR pairs with downstream targets
obj <- find_lr_path(obj, lrpairs, pathways)

# Infer CCIs between cell types
obj <- dec_cci(obj, 
  celltype_sender = "Macrophage",
  celltype_receiver = "Fibroblast"
)

# Or infer all pairwise CCIs
obj <- dec_cci_all(obj)

4. Access Results

# Significant LR pairs with scores
head(obj@lrpair)

# Downstream TF activity
head(obj@tf)

Integrated Databases

SpaTalk incorporates curated biological knowledge from:

Database Content Species
CellTalkDB 3,398 human / 2,033 mouse LR pairs Human, Mouse
KEGG Signaling pathways Human, Mouse
Reactome Pathway interactions Human, Mouse
AnimalTFDB Transcription factors Human, Mouse

Documentation

Advanced Features

Citation

If you use SpaTalk in your research, please cite:

Shao, X., Li, C., Yang, H., Lu, X., Liao, J., Qian, J., Wang, K., Cheng, J., Yang, P., Chen, H., Xu, X., & Fan, X. (2022). Knowledge-graph-based cell-cell communication inference for spatially resolved transcriptomic data with SpaTalk. Nature Communications, 13, 4429. https://doi.org/10.1038/s41467-022-32111-8

@article{shao2022spatalk,
  title={Knowledge-graph-based cell-cell communication inference for spatially resolved transcriptomic data with SpaTalk},
  author={Shao, Xin and Li, Chengyu and Yang, Haihong and Lu, Xiaoyan and Liao, Jie and Qian, Jingyang and Wang, Kai and Cheng, Junyun and Yang, Penghui and Chen, Huajun and Xu, Xiao and Fan, Xiaohui},
  journal={Nature Communications},
  volume={13},
  pages={4429},
  year={2022},
  doi={10.1038/s41467-022-32111-8}
}

Maintainers

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.


GitHub stars