ZJUFanLab / bulk2space

a spatial deconvolution method based on deep learning frameworks, which converts bulk transcriptomes into spatially resolved single-cell expression profiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bulk2Space v1.0.0

De novo analysis of bulk RNA-seq data at spatially resolved single-cell resolution

Jie Liao, Jingyang Qian, Yin Fang, Zhuo Chen, Xiang Zhuang, ..., Huajun Chen*, Xiaohui Fan*

python 3.8 DOI DOI

Bulk2Space is a two-step spatial deconvolution method based on deep learning frameworks, which converts bulk transcriptomes into spatially resolved single-cell expression profiles.

Image text

Requirements and Installation

deep-forest 0.1.5 numpy 1.19.2 pandas 1.1.3 scikit-learn 1.0.1 scipy 1.5.2 scanpy 1.8.1 easydict 1.9 tqdm 4.50.2 Unidecode 1.3.0

Create and activate Python environment

For Bulk2Space, 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 bulk2space python=3.8
conda activate bulk2space

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

Install Bulk2Space

python setup.py build
python setup.py install

Quick Start

To use Bulk2Space we require five formatted .csv files as input (i.e. read in by pandas). We have included two test datasets in the tutorial/data/example_data folder of this repository as examples to show how to use Bulk2Space.

If you choose the spot-based data (10x Genomics, ST, or Slide-seq, etc) as spatial reference, please refer to:

If you choose the image-based data (MERFISH, SeqFISH, or STARmap, etc) as spatial reference, please refer to:

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

Tutorials

Additional step-by-step tutorials now available! Preprocessed datasets used can be downloaded from Google Drive (PDAC) and Google Drive (hypothalamus).

About

Should you have any questions, please feel free to contact the co-first authors of the manuscript, Dr. Jie Liao (liaojie@zju.edu.cn), Mr. Jingyang Qian (qianjingyang@zju.edu.cn), Miss Yin Fang (fangyin@zju.edu.cn), Mr. Zhuo Chen (zhuo.chen@zju.edu.cn), or Mr. Xiang Zhuang (zhuangxiang@zju.edu.cn).

References

Liao, J., Qian, J., Fang, Y. et al. De novo analysis of bulk RNA-seq data at spatially resolved single-cell resolution. Nat Commun 13, 6498 (2022). https://doi.org/10.1038/s41467-022-34271-z

About

a spatial deconvolution method based on deep learning frameworks, which converts bulk transcriptomes into spatially resolved single-cell expression profiles

License:GNU General Public License v3.0


Languages

Language:Jupyter Notebook 99.0%Language:Python 1.0%