Differential expression analysis for single-cell genomics
Project description
🌸 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.
🚀 Installation
PyPI
pip install delnx
Development version
pip install git+https://github.com/joschif/delnx.git@main
⚡ Quickstart
Negative binomial DE (count data)
import delnx as dx
# Fit negative binomial GLMs with quasi-likelihood dispersion shrinkage
fit = dx.tl.nb_fit(adata, condition_key="treatment", reference="control")
# Test for differential expression
results = dx.tl.nb_test(adata, fit, contrast="treatment[T.drugA]")
General-purpose DE (log-normalized / binary data)
# Logistic regression with likelihood ratio test
results = dx.tl.de(
adata,
condition_key="treatment",
reference="control",
contrast="treatment[T.drugA]",
)
# Formula-based design with covariates
results = dx.tl.de(
adata,
formula="~ treatment + batch",
contrast="treatment[T.drugA]",
method="anova",
)
Per-group DE with grouped wrapper
results = dx.tl.grouped(
dx.tl.de, adata,
group_key="cell_type",
condition_key="treatment",
reference="control",
contrast="treatment[T.drugA]",
)
Fast rank-based markers
results = dx.tl.rank_de(adata, condition_key="cell_type")
💎 Features
- Negative binomial GLMs: GPU-accelerated glmGamPoi-style fitting with quasi-likelihood dispersion shrinkage for count data.
- General-purpose DE: Logistic regression, ANOVA, and binomial GLM for log-normalized, scaled, or binary data.
- Formula interface: R-style formulas (
~ treatment + batch) parsed by patsy, with treatment coding and reference levels. - Rank-based markers: Fast AUROC-based one-vs-all marker detection with Numba-optimized ranking.
- Pseudobulking: Perform DE on large multi-sample datasets by using pseudobulk aggregation.
- Effect sizes: Log2 fold change and AUROC computation for pairwise condition comparisons.
- GPU acceleration: Core methods are implemented in JAX, enabling GPU acceleration for scalable DE analysis on large datasets.
📖 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file delnx-0.3.0.tar.gz.
File metadata
- Download URL: delnx-0.3.0.tar.gz
- Upload date:
- Size: 5.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdbbc56ef70086ddffcb0a4670d622286570a06f144fddde5a141db9af57a6c2
|
|
| MD5 |
1436a6aef4edf6db922943c1667af0f3
|
|
| BLAKE2b-256 |
e999399c1046a51adba3d3e2a0966c21c23fc233fd84c8ebe5446b0a63997571
|
Provenance
The following attestation bundles were made for delnx-0.3.0.tar.gz:
Publisher:
release.yaml on mlbelab/delnx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
delnx-0.3.0.tar.gz -
Subject digest:
fdbbc56ef70086ddffcb0a4670d622286570a06f144fddde5a141db9af57a6c2 - Sigstore transparency entry: 1362591093
- Sigstore integration time:
-
Permalink:
mlbelab/delnx@788804ba29e902d6866784c1e07e4a0b59eb1cab -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/mlbelab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@788804ba29e902d6866784c1e07e4a0b59eb1cab -
Trigger Event:
release
-
Statement type:
File details
Details for the file delnx-0.3.0-py3-none-any.whl.
File metadata
- Download URL: delnx-0.3.0-py3-none-any.whl
- Upload date:
- Size: 86.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
288b28ca52655b72caf60643df442e628d287853c17adafdfdad4aafb60928b6
|
|
| MD5 |
f923f35fd172bf9f44c34ec3ca435251
|
|
| BLAKE2b-256 |
a59d0ab697961f145707e3875f7d76bd0813a570c12227d67f11ea734ee01a64
|
Provenance
The following attestation bundles were made for delnx-0.3.0-py3-none-any.whl:
Publisher:
release.yaml on mlbelab/delnx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
delnx-0.3.0-py3-none-any.whl -
Subject digest:
288b28ca52655b72caf60643df442e628d287853c17adafdfdad4aafb60928b6 - Sigstore transparency entry: 1362591126
- Sigstore integration time:
-
Permalink:
mlbelab/delnx@788804ba29e902d6866784c1e07e4a0b59eb1cab -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/mlbelab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@788804ba29e902d6866784c1e07e4a0b59eb1cab -
Trigger Event:
release
-
Statement type: