Performing differential testing on pseudobulked single-cell data
Project description
scBulkDE
scBulkDE performs differential expression testing on pseudobulked single-cell data. It aggregates cells into pseudobulk samples, infers a full-rank design matrix and performs differential gene expression analysis while accounting for categorical and continuous covariates. Currently PyDeseq2 and ANOVA backends are supported for DE testing.
Key features
- Pseudobulk aggregation with quality control
- Covariate-aware design — categorical and continuous covariates with automated resolution of confounding factors
- Multiple DE engines — ANOVA F-test and PyDESeq2
- Fallback strategies — pseudoreplicate generation or single-cell testing when biological replicates are insufficient
- Scanpy drop-in —
tl.rank_genes_groupsstores results inadata.unsfor seamless integration with scanpy.
Installation
You need to have Python 3.11 or newer installed on your system.
Install from PyPI:
pip install scbulkde
Or install the latest development version:
pip install git+https://github.com/quadbio/scBulkDE.git@main
Quick start
import scbulkde as scb
# One-step: pseudobulk + DE
de_result = scb.tl.de(
adata,
group_key="cell_type",
query="B cells",
reference="rest",
replicate_key="donor",
engine="anova",
)
de_result.results.head()
Or separate pseudobulking from testing for more control:
# Step 1 — Pseudobulk
pb_result = scb.pp.pseudobulk(
adata,
group_key="cell_type",
query="B cells",
reference="rest",
replicate_key="donor",
)
# Step 2 — DE
de_result = scb.tl.de(pb_result, engine="anova")
Scanpy drop-in replacement
import scanpy as sc
import scbulkde as scb
scb.tl.rank_genes_groups(
adata,
groupby="cell_type",
de_kwargs=dict(replicate_key="donor", engine="anova"),
)
sc.pl.rank_genes_groups(adata, n_genes=20)
Documentation
Please refer to the documentation, in particular the API documentation.
Release notes
See the changelog.
Contact
For questions and help requests, you can reach out in the scverse discourse. If you found a bug, please use the issue tracker.
Citation
t.b.a
Project details
Release history Release notifications | RSS feed
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 scbulkde-0.0.2.tar.gz.
File metadata
- Download URL: scbulkde-0.0.2.tar.gz
- Upload date:
- Size: 236.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b342c6acd4c3fbe189b94c1772f911d9e5b1c715a139f7ca5a4bf40562ab6bf
|
|
| MD5 |
428bdef46ad12f72264846066d1d69af
|
|
| BLAKE2b-256 |
20fe6153cdf7c5da6eccfcaa5e14edfe34df9266fe26ce8b105dd6d7220476d1
|
Provenance
The following attestation bundles were made for scbulkde-0.0.2.tar.gz:
Publisher:
release.yaml on quadbio/scBulkDE
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scbulkde-0.0.2.tar.gz -
Subject digest:
5b342c6acd4c3fbe189b94c1772f911d9e5b1c715a139f7ca5a4bf40562ab6bf - Sigstore transparency entry: 1283195367
- Sigstore integration time:
-
Permalink:
quadbio/scBulkDE@57f1d9576ebfac87bd53a5a389743fe05007b853 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/quadbio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@57f1d9576ebfac87bd53a5a389743fe05007b853 -
Trigger Event:
release
-
Statement type:
File details
Details for the file scbulkde-0.0.2-py3-none-any.whl.
File metadata
- Download URL: scbulkde-0.0.2-py3-none-any.whl
- Upload date:
- Size: 41.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 |
592d36c59b592f1f85f01542050141e62e236352f9bbaa8e724fcbabf9db298c
|
|
| MD5 |
b1a73fd2b807549eb99fdf7c560a1251
|
|
| BLAKE2b-256 |
d2d89e7965c165e8f730108307fdc7611b0c7cd265bfe682f075982ccae5f055
|
Provenance
The following attestation bundles were made for scbulkde-0.0.2-py3-none-any.whl:
Publisher:
release.yaml on quadbio/scBulkDE
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scbulkde-0.0.2-py3-none-any.whl -
Subject digest:
592d36c59b592f1f85f01542050141e62e236352f9bbaa8e724fcbabf9db298c - Sigstore transparency entry: 1283195383
- Sigstore integration time:
-
Permalink:
quadbio/scBulkDE@57f1d9576ebfac87bd53a5a389743fe05007b853 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/quadbio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@57f1d9576ebfac87bd53a5a389743fe05007b853 -
Trigger Event:
release
-
Statement type: