SpaGCN is a graph convolutional network to integrate gene expression and histology to identify spatial domains and spatially variable genes. To jointly model all spots in a tissue slide, SpaGCN integrates information from gene expression, spatial locations and histological pixel intensities across spots into an undirected weighted graph. Each vertex in the graph contains gene expression information of a spot and the edge weight between two vertices quantifies their expression similarity that is driven by spatial dependency of their coordinates and the corresponding histology. To aggregate gene expression of each spot from its neighboring spots, SpaGCN utilizes a convolutional layer based on edge weights specified by the graph. The aggregated gene expression is then fed into a deep embedding clustering algorithm to cluster the spots into different spatial domains. After spatial domains are identified, genes that are enriched in each spatial domain can be detected by differential expression analysis between domains. SpaGCN is applicable to both in-situ transcriptomics with single-cell resolution (seqFISH, seqFISH+, MERFISH, STARmap, and FISSEQ) and spatial barcoding based transcriptomics (Spatial Transcriptomics , SLIDE-seq, SLIDE-seqV2, HDST, 10x Visium, DBiT-seq, Stero-seq, and PIXEL-seq) data.
For thorough details, see the preprint: Biorxiv
The SpaGCN package is an implementation of a garph convolutional network for spatial transcriptomics. With SpaGCN, you can:
For the step-by-step tutorial, please refer to:
https://github.com/jianhuupenn/SpaGCN/blob/master/tutorial/tutorial.md
A Jupyter Notebook of the tutorial is accessible from :
https://github.com/jianhuupenn/SpaGCN/blob/master/tutorial/tutorial.ipynb
Toy data and results can be downloaded at:
https://drive.google.com/drive/folders/1zten54vkjorp26T4iD0ApQGa9ut5eY42?usp=sharing
Please install Jupyter in order to open this notebook.
For users who are new to Python, we provide an Easy Mode SpaGCN. The parameter setting and intermedium steps are simplified.
Important Notes: This easy mode ONLY have basic functions and is ONLY for analysis purpose.
For method comparison, debugging, customizing parameters, and checking intermedium outputs, please refer to the detailed tutorial above.
Easy Mode SpaGCN tutorial:
https://github.com/jianhuupenn/SpaGCN/blob/master/tutorial/tutorial_ez_mode.md
Easy Mode SpaGCN Jupyter Notebook:
https://github.com/jianhuupenn/SpaGCN/blob/master/tutorial/tutorial_ez_mode.ipynb
Python support packages: igraph, torch, pandas, numpy, scipy, scanpy > 1.5, anndata, louvain, sklearn.
Environment 1:
Environment 2:
Environment 3:
Souce code: Github
We are continuing adding new features. Bug reports or feature requests are welcome.
Last update: 06/19/2021, version 1.2.0
Please consider citing the following reference: