Skip to main content

Differential expression analysis for single-cell genomics

Project description

delnx

PyPI version Tests Codecov pre-commit.ci status Documentation Status

🌳 delnx

delnx ("de-lo-nix" | /dɪˈlɒnɪks/) is a python package for differential expression analysis of (single-cell) genomics data. It enables scalable analyses of atlas-level datasets through GPU-accelerated regression models and statistical tests implemented in JAX. It also provides a consistent interface to perform DE analysis with other methods, such as statsmodels and PyDESeq2.

🚀 Installation

PyPI

pip install delnx

Development version

pip install git+https://github.com/joschif/delnx.git@main

⚡ Quickstart

import delnx as dx

# Compute size factors
adata = dx.pp.size_factors(adata, method="ratio")

# Estimate dispersion parameters
adata = dx.pp.dispersion(adata, size_factor_key="size_factor", method="deseq2")

# Run differential expression analysis
results = dx.tl.de(
    adata,
    condition_key="condition",
    group_key="cell_type",
    mode="all_vs_ref",
    reference="control",
    method="negbinom",
    size_factor_key="size_factor",
    dispersion_key="dispersion",
)

💎 Features

  • Pseudobulking: Perform DE on large multi-sample datasets by using pseudobulk aggregation.
  • Size factor estimation: Compute size factors for normalization and DE analysis.
  • Dispersion estimation: Estimate dispersion parameters for negative binomial models.
  • Differential expression analysis: Consistent interface to perform DE analysis using various methods, including:
    • Negative binomial regression with dispersion estimates.
    • Logistic regression with a likelihood ratio test.
    • ANOVA tests based on linear models.
    • DESeq2 through PyDESeq2, a widely used method for DE analysis of RNA-seq data.
  • GPU acceleration: Most methods are implemented in JAX, enabling GPU acceleration for scalable DE-analysis on large datasets.

⚙️ Backends

delnx implements DE tests using regression models and statistical tests from various backends:

🗺️ Roadmap

  • Provide a common interface to standard GLM-based DE tests (inspired by Seurat::FindMarkers)
    • Logistic regression and likelihood ratio test
      • statsmodels
      • JAX
      • cuML
    • Negative binomial regression
      • statsmodels
      • JAX
    • ANOVA
      • statsmodels
      • JAX
    • Binomial regression for binary data
      • statsmodels
      • JAX
  • Implement DESeq2 wrapper using PyDESeq2
  • Implement size factor estimation methods
  • Add dispersion estimation methods
    • Basic gene-wise dispersion estimation
    • DESeq2 and edgeR-inspired dispersion estimation with shrinkage
    • Take design and covariates into account for dispersion estimation
  • Plotting functions to visualize DE results
  • Gene set enrichment analysis for DE results

📖 Documentation

For more information, check out the documentation and the API reference.

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

delnx-0.2.2.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

delnx-0.2.2-py3-none-any.whl (75.3 kB view details)

Uploaded Python 3

File details

Details for the file delnx-0.2.2.tar.gz.

File metadata

  • Download URL: delnx-0.2.2.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for delnx-0.2.2.tar.gz
Algorithm Hash digest
SHA256 6164d06757b414227c03eb4cd696e612a4228527d2e2ae8e3b3e38244f7f4649
MD5 ce5c7d08fdaf0bb00127f135896d699e
BLAKE2b-256 5958b2fad65f191054144df0ed21a11cca9b06d4fc6555c91af32576c7050fe9

See more details on using hashes here.

Provenance

The following attestation bundles were made for delnx-0.2.2.tar.gz:

Publisher: release.yaml on joschif/delnx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file delnx-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: delnx-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 75.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for delnx-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6a844668b17face8d5699540b3dbe06df907aebf9939bc4c790fb80173634ef6
MD5 37fb8e69ceb20539780de2b4b50afef1
BLAKE2b-256 dedf014b15ca7c348d456f624225526a109f4c922d24db22c059236f4892064f

See more details on using hashes here.

Provenance

The following attestation bundles were made for delnx-0.2.2-py3-none-any.whl:

Publisher: release.yaml on joschif/delnx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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