Skip to content

an integrative algorithm to distinguish spatially variable cell subclusters by reconstructing cells onto a pseudo space with spatial transcriptome references

License

Notifications You must be signed in to change notification settings

ForwardYang98/scSpace

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scSpace

Reconstruction of cell pseudo space from single-cell RNA sequencing data

python 3.8 R 4.1

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 graph of cells can be embedded jointly for the further cell typing with higher accuracy and precision.

avatar

Requirements

numpy 1.19.2 pandas 1.1.3 scikit-learn 1.0.1 scipy 1.5.2 torch 1.7.0 optparse 1.7.1 Seurat 4.0.1 leidenAlg 1.0.3 BiocManager 1.30.15 BiocNeighbors 1.10.0 igraph 1.2.6

For scSpace, the python version need is over 3.8 and the R version need is over 4.1.

cd setup
pip install -r requirements.txt
Rscript requirements.R

Parameters

Some important parameters in scSpace are listed bellow:

In pre-processing step:

  • --project: the name of the folder where the data is stored. Make sure it's in the data/ directory
  • --sc_data: the name of input scRNA-seq data
  • --sc_meta: the name of input scRNA-seq metadata
  • --st_data: the name of input spatial transcriptomics data
  • --st_meta: the name of input spatial transcriptomics metadata. Make sure this file contains two columns of xcoord and ycoord
  • --normalize: normalize the data or not
  • --st_type: st for spot-based ST data (10x Visium, Slide-seq, Slide-seq v2, etc) and image for imaged-based ST data (STARmap, MERFISH, seqFISH, etc)
  • --n_features: the number of genes selected for downstream analysis

In scSpace step:

  • --kernel_type: the kernel function used in transfer component analysis
  • --dim: the dimension of extracted characteristic representation across scRNA-seq and ST data
  • --batch_size: the batch size for multiple layer perceptron model training
  • --lr: the learning rate for multiple layer perceptron model training
  • --epoch_num: the total epoch number for multiple layer perceptron model training
  • --sample_mlp: use only a simple multiple layer perceptron model with three-layers
  • --hidden_size: the hidden layer size for simple multiple layer perceptron model
  • --sub_cluster: apply sub-clustering analysis for a specific cell type. If FLASE scSpace would apply clustering for all cells in scRNA-seq data
  • --Ks: the number of nearest cells in space graph
  • --Kg: the number of nearest cells in gene expression graph
  • --res: the resolution for scSpace clustering
  • --target_num: the target number of clusters for scSpace clustering. If --target_num 0 scSpace would apply clustering directly with resolution provided

Tutorials

  1. Demonstration of scSpace on simulated data

  2. Spatial reconstruction of mouse intestine scRNA-seq data

  3. Spatial analysis of the invasion of myeloid subpopulations in Covid-19

About

scSpace was developed by Jie Liao and Jingyang Qian. Should you have any questions, please contact Jie Liao at liaojie@zju.edu.cn, or Jingyang Qian at qianjingyang@zju.edu.cn

About

an integrative algorithm to distinguish spatially variable cell subclusters by reconstructing cells onto a pseudo space with spatial transcriptome references

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 62.1%
  • Python 37.9%