Skip to content

an SRT simulator for simulating multiple spatial variability in spatial resolved transcriptomics and generating unbiased simulated SRT data

License

Notifications You must be signed in to change notification settings

ZJUFanLab/scCube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scCube v2.0.1

Simulating multiple variability in spatially resolved transcriptomics

python >=3.8 DOI

scCube is a Python package for independent, reproducible, and platform-diverse simulation of spatially-resolved transcriptomic data

avatar

Major updates in v2.0.0

  1. scCube now allows users to consider the heterogeneity within cell types and generate the spatial patterns of cell subtypes flexibly:
  2. scCube now allows users to generate more interpretable spatial patterns in a customized manner:

Requirements and Installation

anndata 0.8.0 numpy 1.23.5 pandas 1.5.3 scanpy 1.9.1 pot 0.8.2 matplotlib 3.6.3 seaborn 0.12.2 tqdm 4.64.1

Create and activate Python environment

For scCube, 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 sccube python=3.8
conda activate sccube

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 scCube-main
pip install -r requirements.txt

Install scCube

python setup.py build
python setup.py install

Quick Start (Training new models directly)

scCube requires a data file (gene expression profiles) and a meta file (cell type/domain annotations) as the input, which can be stored as either .csv (read by pandas) or .h5ad (loaded by scanpy) formats. We have included two toy datasets in the tutorial/demo_data folder of this repository as examples to show how to use scCube.

Reference-based simulation:

Reference-free simulation:

For more details about the format of input and the description of parameters, see here.

Trained models and datasets

In the current version, scCube includes about 300 trained models of various tissues derived from four human and mouse scRNA-seq atlas (Tabula Muris, Tabula Sapiens, MCA, and HCL) as well as high-quality SRT datasets. Detailed information about these models and datasets can be found here.

Tutorials (loading trained models provided by scCube)

Additional step-by-step tutorials are now available! Users can employ the trained models conveniently through the Python package to generate the new gene expression profiles of specific tissues. We provide the following tutorials as examples:

Reference-based simulation:

Reference-free simulation:

About

scCube was developed by Jingyang Qian. Should you have any questions, please contact Jingyang Qian at [email protected].

References

Qian, J., Bao, H., Shao, X. et al. Simulating multiple variability in spatially resolved transcriptomics with scCube. Nat Commun 15, 5021 (2024). https://doi.org/10.1038/s41467-024-49445-0

About

an SRT simulator for simulating multiple spatial variability in spatial resolved transcriptomics and generating unbiased simulated SRT data

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published