This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Python deconvolution tools for bulk RNA-seq data

I’m looking for a Python package to perform cell-type deconvolution on bulk RNA-seq datasets. I work with a large number of samples from diverse tissues and sources, and my goal is to develop a Python-based pipeline that can handle this analysis on the fly, to make my life easier.

In the past, I’ve used xCell, but since it isn’t available in Python and isn’t a true deconvolution method that provides actual cell-fraction estimates, I’m now looking for alternatives. I’ve recently transitioned to using Python, so I’d really appreciate recommendations for a robust, well maintained deconvolution tool, along with guidance on how to use it effectively.

Thanks!

rna-seq bulk-rna-seq deconvolution python transcriptomics

2 answers

Imo you are approaching this the wrong way. R packages for deconvolution that are heqavily used and cited do exist, for example MuSiC and BisqueRNA exist. Also, interoperatability packages such as r2py and reticulate do exist. Hence, it is easy to run these packages from inside python, without reinventing the wheel. It comes down most of the time to running a single command, so easy to implement.

I see, yes that makes sense. Could you recommend any reliable and accurate package I could use ? ATpoint

MuSiC 2.0 might be a good choice ? The thing is I usually use bulk datasets with either Normal samples or Tumor samples, I rarely use datasets with both conditions in the same dataset.

I know I’m biased because I’m one of the developers, but if you’re still looking for a Python-based deconvolution tool, I’d recommend Rectangle:

GitHub: https://github.com/ComputationalBiomedicineGroup/Rectangle Preprint: https://www.biorxiv.org/content/10.64898/2026.07.07.736950v1

Rectangle is a Python package for bulk RNA-seq cell-type deconvolution that’s easy to integrate into Python workflows. In our benchmarks, it delivers accurate cell-fraction estimates, fine-grained cellular resolution, low spillover, robustness to unknown cellular content, and scales well to large datasets.

Log in to answer this question.