Skip to main content

A python implementation of DESeq2.

Project description

pypi version pypiDownloads condaDownloads license

PyDESeq2 is a python implementation of the DESeq2 method [1] for differential expression analysis (DEA) with bulk RNA-seq data, originally in R. It aims to facilitate DEA experiments for python users.

As PyDESeq2 is a re-implementation of DESeq2 from scratch, you may experience some differences in terms of retrieved values or available features.

Currently, available features broadly correspond to the default settings of DESeq2 (v1.34.0) for single-factor and multi-factor analysis (with categorical or continuous factors) using Wald tests. We plan to implement more in the future. In case there is a feature you would particularly like to be implemented, feel free to open an issue.

Table of Contents

Installation

PyPI

PyDESeq2 can be installed from PyPI using pip:

pip install pydeseq2

We recommend installing within a conda environment:

conda create -n pydeseq2
conda activate pydeseq2
conda install pip
pip install pydeseq2

Bioconda

PyDESeq2 can also be installed from Bioconda with conda:

conda install -c bioconda pydeseq2

If you're interested in contributing or want access to the development version, please see the contributing section.

Requirements

The list of package version requirements is available in setup.py.

For reference, the code is being tested in a github workflow (CI) with python 3.9 to 3.11 and the following package versions:

- anndata 0.8.0
- numpy 1.23.0
- pandas 1.4.3
- scikit-learn 1.1.1
- scipy 1.11.0

Please don't hesitate to open an issue in case you encounter any issue due to possible deprecations.

Getting started

The Getting Started section of the documentation contains downloadable examples on how to use PyDESeq2.

Documentation

The documentation is hosted here on ReadTheDocs. If you want to have the latest version of the documentation, you can build it from source. Please go to the dedicated README.md for information on how to do so.

Data

The quick start examples use synthetic data, provided in this repo (see datasets.)

The experiments described in the PyDESeq2 article rely on data from The Cancer Genome Atlas, which may be obtained from this portal.

Contributing

Please the Contributing section of the documentation to see how you can contribute to PyDESeq2.

1 - Download the repository

git clone https://github.com/owkin/PyDESeq2.git

2 - Create a conda environment

Run conda create -n pydeseq2 python=3.9 (or higher python version) to create the pydeseq2 environment and then activate it: conda activate pydeseq2.

cd to the root of the repo and run pip install -e ."[dev]" to install in developer mode.

Then, run pre-commit install.

The pre-commit tool will automatically run ruff, black, and mypy.

PyDESeq2 is a living project and any contributions are welcome! Feel free to open new PRs or issues.

Development Roadmap

Here are some of the features and improvements we plan to implement in the future:

  • Integration to the scverse ecosystem:
  • Variance-stabilizing transformation
  • Improving multi-factor analysis:
    • Allowing n-level factors
    • Support for continuous covariates
    • Implementing interaction terms

Citing this work

@article{muzellec2023pydeseq2,
  title={PyDESeq2: a python package for bulk RNA-seq differential expression analysis},
  author={Muzellec, Boris and Telenczuk, Maria and Cabeli, Vincent and Andreux, Mathieu},
  year={2023},
  doi = {10.1093/bioinformatics/btad547},
  journal={Bioinformatics},
}

References

[1] Love, M. I., Huber, W., & Anders, S. (2014). "Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2." Genome biology, 15(12), 1-21. https://genomebiology.biomedcentral.com/articles/10.1186/s13059-014-0550-8

[2] Zhu, A., Ibrahim, J. G., & Love, M. I. (2019). "Heavy-tailed prior distributions for sequence count data: removing the noise and preserving large differences." Bioinformatics, 35(12), 2084-2092. https://academic.oup.com/bioinformatics/article/35/12/2084/5159452

License

PyDESeq2 is released under an MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydeseq2-0.5.0rc1.tar.gz (54.6 kB view details)

Uploaded Source

Built Distribution

pydeseq2-0.5.0rc1-py3-none-any.whl (50.6 kB view details)

Uploaded Python 3

File details

Details for the file pydeseq2-0.5.0rc1.tar.gz.

File metadata

  • Download URL: pydeseq2-0.5.0rc1.tar.gz
  • Upload date:
  • Size: 54.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for pydeseq2-0.5.0rc1.tar.gz
Algorithm Hash digest
SHA256 6b5fe0151bf24e7a38eb1c6522c93b19df16eb1c3d9951cc543f9e4412a5de32
MD5 616004401fff2f7bfd18996925523d28
BLAKE2b-256 8191eeea5314860dfe5263683d882f5bca2309b18d80be569fae38eb6b91c29f

See more details on using hashes here.

File details

Details for the file pydeseq2-0.5.0rc1-py3-none-any.whl.

File metadata

  • Download URL: pydeseq2-0.5.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 50.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for pydeseq2-0.5.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 d7f35f0499b1229e6b32f8885ef94012c78cf75713ed0a7beb178405f6e6f751
MD5 a91f355a82514c29d811ab1a95fbe482
BLAKE2b-256 cea6a2fa7644becc63e3f9eeedf8d788a98a17f37502b8f511d65cca77340957

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page