This repository contains a collection of python notebooks for reproducing analyses and results from the original publication [1]. The notebooks folder contains code for:
- Generate spatial gene expression network from in situ transcriptomic data and train an unsupervised graph representation model for producing a node embedding (
spage2vec_*.ipynb) - Visualize and cluster the learned representations in subcelluar funcional domain (
*_embedding.ipynb)
The sorce code presented in this repository has been developed and tested on a Linux machine running Ubuntu 16.04 operating system with 64GB RAM, Intel(R) Core(TM) i7-5930K CPU @ 3.50GHz cpu, and nvidia TITAN X gpu.
The following python packages are required for running the notebooks:
numpy==1.17.2tensorflow==1.12.0tensorboard==1.12.2networkx==2.4pandas==0.25.2matplotlib==3.0.3stellargraph==0.8.1scipy==1.3.1scikit-learn>=0.21.3tqdm==4.36.1umap-learn==0.3.10scanpy==1.4.4leidenalg==0.7.0seaborn==0.9.0h5py==2.10.0loompy==3.0.6
Spatial gene expression data for the analyzed assays can be downloaded at: https://doi.org/10.5281/zenodo.3897401. Please extract the content of the zipped archive in this repository local folder before running the notebooks.
[1] Partel, G., and Wählby C. Spage2vec: Unsupervised detection of spatial gene expression constellations. BioRxiv, https://doi.org/10.1101/2020.02.12.945345, (2019).