scSpace
scSpace copied to clipboard
an integrative algorithm to distinguish spatially variable cell subclusters by reconstructing cells onto a pseudo space with spatial transcriptome references
scSpace v1.0.0
Reconstruction of cell pseudo space from single-cell RNA sequencing data
scSpace (single-cell and spatial position associated co-embeddings) is an integrative algorithm that integrates spatial transcriptome data to reconstruct spatial associations of single cells within scRNA-seq data. Using transfer component analysis (TCA), scSpace could extract the characteristic matrixes of spatial transcriptomics and scRNA-seq, and project single cells into a pseudo space via a multiple layer perceptron (MLP) model, so that gene expression and spatial weight of cells can be embedded jointly for the further cell typing with higher accuracy and precision.
Code for generating the figures in this study can be found here.
Requirements and Installation
Create and activate Python environment
For scSpace, the python version need is over 3.8. If you have installed Python3.6 or Python3.7, consider installing Anaconda, and then you can create a new environment.
conda create -n scspace python=3.8
conda activate scspace
Install pytorch
The version of pytorch should be suitable to the CUDA version of your machine. You can find the appropriate version on the PyTorch website. Here is an example with CUDA11.6:
pip install torch --extra-index-url https://download.pytorch.org/whl/cu116
Install other requirements
cd scSpace-master
pip install -r requirements.txt
Install scSpace
python setup.py build
python setup.py install
Quick Start
To use scSpace we require five formatted .csv
files as input (i.e. read in by pandas). We have included a toy dataset
in the vignettes/data folder of this repository as examples to show how to use scSpace:
- Demonstration of scSpace on demo dataset
Tutorials
Additional step-by-step tutorials now available! Preprocessed datasets used can be downloaded from Google Drive.
-
Spatial reconstruction of human DLPFC spatial transcriptomics data
-
Spatial reconstruction of human SCC spatial transcriptomics data
-
Spatial reconstruction of mouse intestine scRNA-seq data
-
Spatial analysis of T cells subpopulations in melanoma
About
scSpace was developed by Jie Liao and Jingyang Qian. Should you have any questions, please contact Jie Liao at [email protected], or Jingyang Qian at [email protected]
References
Qian, J., Liao, J., Liu, Z. et al. Reconstruction of the cell pseudo-space from single-cell RNA sequencing data with scSpace. Nat Commun 14, 2484 (2023). https://doi.org/10.1038/s41467-023-38121-4