Skip to main content

DeSide: Cellular Deconvolution of Bulk RNA-seq

PyPI version Install with pip MIT

What is DeSide?

DeSide is a DEep-learning and SIngle-cell based DEconvolution method for solid tumors, which can be used to infer cellular proportions of different cell types from bulk RNA-seq data.

DeSide consists of the following four parts (see figure below):

  • DNN Model
  • Single Cell Dataset Integration
  • Cell Proportion Generation
  • Bulk Tumor Synthesis
Overview of DeSide

In this repository, we provide the code for implementing these four parts and visualizing the results.

Requirements

DeSide requires Python 3.8 or higher. It has been tested on Linux and MacOS, but should work on Windows as well.

  • tensorflow>=2.11.1
  • scikit-learn==0.24.2
  • anndata>=0.8.0
  • scanpy==1.8.0
  • umap-learn==0.5.1
  • pandas==1.5.3
  • numpy>=1.22
  • matplotlib
  • seaborn>=0.11.2
  • bbknn==1.5.1
  • SciencePlots
  • matplotlib<3.7

Installation

pip should work out of the box:

# creating a virtual environment is recommended
conda create -n deside python=3.8
conda activate deside
# update pip
python3 -m pip install --upgrade pip
# install deside
pip install deside

Usage Examples

Usage examples can be found: DeSide_mini_example

Three examples are provided:

  • Using pre-trained model
  • Training a model from scratch
  • Generating a synthetic dataset

Example 1 can now be run with one function call after import:

import deside

deside.predict_with_pretrained_model(
    input_file="path/xx_TPM.csv",
    output_file_path="./results/y_pred.csv"
)

This helper expects the same local assets used in the mini example:

  • ./DeSide_model/ for the pre-trained model files
  • ./datasets/gene_set/ for the pathway .gmt files

By default, missing Example 1 assets will be downloaded automatically into those folders (with explicit download logs). To disable auto-download, pass auto_download=False.

You can also run Example 1 from this repository as a script:

python examples/example1_pretrained_model.py \
  --input-file path/xx_TPM.csv \
  --output-file ./results/y_pred.csv

Documentation

For all detailed documentation, please check https://deside.readthedocs.io/. The documentation will demonstrate the usage of DeSide from the following aspects:

  • Installation in a virtual environment
  • Usage examples
  • Datasets used in DeSide
  • Functions and classes in DeSide

Changelog

See docs/changelog.md for the full change history.

  • v1.3.3 (June 16, 2026): add a one-call pre-trained model API, automatic downloads for Example 1 assets, and a runnable Example 1 script.

License

DeSide can be used under the terms of the MIT License.

Contact

Any questions or suggestions about DeSide are welcomed! Please report it on issues, or contact Xin Xiong (onlybelter@outlook.com) or Xuefei Li (xuefei.li@siat.ac.cn).

Manuscript

@article{Xiong2023.05.11.540466,
	author = {Xin Xiong and Yerong Liu and Dandan Pu and Zhu Yang and Zedong Bi and Liang Tian and Xuefei Li},
	title = {DeSide: A unified deep learning approach for cellular decomposition of bulk tumors based on limited scRNA-seq data},
	elocation-id = {2023.05.11.540466},
	year = {2023},
	doi = {10.1101/2023.05.11.540466},
	URL = {https://www.biorxiv.org/content/early/2023/05/14/2023.05.11.540466},
	eprint = {https://www.biorxiv.org/content/early/2023/05/14/2023.05.11.540466.full.pdf},
	journal = {bioRxiv}
}

@article{Xiong2024-nq,
  title        = {{DeSide}: A unified deep learning approach for cellular
                  deconvolution of tumor microenvironment},
  author       = {Xiong, Xin* and Liu, Yerong* and Pu, Dandan and Yang, Zhu and
                  Bi, Zedong and Tian, Liang# and Li, Xuefei#},
  journaltitle = {Proc. Natl. Acad. Sci. U. S. A.},
  volume       = {121},
  issue        = {46},
  pages        = {e2407096121},
  date         = {2024},
  doi          = {10.1073/pnas.2407096121},
  URL          = {https://www.pnas.org/doi/10.1073/pnas.2407096121}
}

Metadata

Release files for DeSide 1.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DeSide 1.3.3
File Size Uploaded
deside-1.3.3.tar.gz 177.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DeSide 1.3.3
File Interpreter ABI Platform
deside-1.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 280.8 kB

Release files / deside-1.3.3.tar.gz

Download URL deside-1.3.3.tar.gz
Size 177.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ba11c461a1fd26bcb689f0efcf4b492cd49a8b0456886e8252cc7e67ad5c6fba
BLAKE2b-256 checksum
How to use checksums
c3de080845f05d44065dad50b129d94da204c7319c9f2d6a8f34f84eba5b1a2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.

Transparency log

Release files / deside-1.3.3-py3-none-any.whl

Download URL deside-1.3.3-py3-none-any.whl
Size 103.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
701c02b3360aa2a8c69212e333530888dde73221c4ac127662952b56166b9146
BLAKE2b-256 checksum
How to use checksums
6452f0cdf580e984d9f2f5b1eb2626880b58524487a1ef8a19948901e91e733f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.3.3 This release

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page