This model is able to accurately deconvolve bulk RNA-seq data into cell fractions and predict cell-type-specific gene expression at cell-type level based on scRNA-seq data.
related article Deep autoencoder for interpretable tissue-adaptive deconvolution and cell-type-specific gene analysis is accepted by Nature Communications
TAPE uses PyTorch as its Deep-learning framework, so the suitable version of PyTorch will accelerate the model training process. We recommend users to install PyTorch(>=1.8.0) with right compute platform (CUDA, CPU or ROCm) from its official website in advance.
For example, we used NVIDIA GPU RTX 3090, so we choose the CUDA version 11.1 and the command is:
pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
If PyTorch is successfully installed, then TAPE could be installed from PyPI directly:
Update: I relax the dependece requirements to enable the compatibility with current packages.
pip install scTAPE==1.1.2
Usually, the installation time depends on your downloading speed.
Required Files:
Warning: single-cell reference and bulk samples should contain the same cell types
# basic example
from TAPE import Deconvolution
SignatureMatrix, CellFractionPrediction = \
Deconvolution(sc_ref, bulkdata, sep='\t', scaler='mms',
datatype='counts', genelenfile='./GeneLength.txt',
mode='overall', adaptive=True, variance_threshold=0.98,
save_model_name=None,
batch_size=128, epochs=128, seed=1)
parameters:
Since the original implementation of Scaden [repository] [paper] is not easy for us to test, we implemented the PyTorch version of Scaden. If you want to use Scaden to deconvolve bulk RNA-seq data, you can use the following code:
from TAPE.deconvolution import ScadenDeconvolution
Pred = ScadenDeconvolution(sc_ref, bulkdata, sep='\t',
batch_size=128, epochs=128)
An example is placed in the Test directory. Please run the example to get familiar with TAPE.
Run the demo may takes 2 to 3 mins with GPU acceleration or 10 mins with CPU.
If you find any bugs or have problems when you are using scTAPE, feel free to raise issues.
@article{TAPE,
author = {Chen, Yanshuo and Wang, Yixuan and Chen, Yuelong and Cheng, Yuqi and Wei, Yumeng and Li, Yunxiang and Wang, Jiuming and Wei, Yingying and Chan, Ting-Fung and Li, Yu},
title = {Deep autoencoder for interpretable tissue-adaptive deconvolution and cell-type-specific gene analysis},
journal = {Nature Communications},
volume = {13},
number = {1},
pages = {6735},
ISSN = {2041-1723},
DOI = {10.1038/s41467-022-34550-9},
url = {https://doi.org/10.1038/s41467-022-34550-9},
year = {2022},
type = {Journal Article}
}
Special thanks to Mengyue Sun, for his help to accelerate the sampling process (in the simulation.py).
Much thanks to Yibo Liu, for his advice on building such a nice repository.