Pure-Python port of condiments — differential trajectory analysis across conditions (Roux de Bezieux et al. Nat Commun 2024).
Project description
py-condiments
A Python port of condiments (Roux de Bezieux et al., Nature Communications 2024) — differential-trajectory analysis between conditions in single-cell RNA-seq.
- AnnData-compatible
- 7/7 R exports ported
- imbalance_score Pearson = 1.0000 vs R on canonical toy fixture
Install
pip install pycondiments
Quick-start
import pycondiments as cd
# Given a Slingshot pseudotime + cellWeights + condition labels per cell:
imb = cd.imbalance_score(rd, conditions, k=10, smooth=10)
ptest = cd.progressionTest(pseudotime, conditions, cellWeights=cellWeights)
ttest = cd.topologyTest(pseudotime, cellWeights, conditions)
Function map
| Python | R | Status |
|---|---|---|
imbalance_score |
imbalance_score |
✅ Pearson 1.000 vs R |
progressionTest |
progressionTest |
✅ both agree on significance |
differentiationTest |
fateSelectionTest |
✅ (multi-lineage only) |
topologyTest |
topologyTest |
🟡 simplified (v0.1) |
weights_from_pst |
weights_from_pst |
✅ |
merge_sds |
merge_sds |
✅ |
create_differential_topology |
create_differential_topology |
✅ test-data helper |
Known limitations (v0.1)
topologyTestis approximate: uses χ² on dominant-lineage contingency rather than re-fitting Slingshot per condition. Strong topology changes will be missed.- No GAM smoothing in
imbalance_score: R uses mgcvs(); we use kNN-average. Both give similar smoothed z-scores. - No multi-condition support: v0.1 supports 2-condition tests only. Multi-condition extension is on the v0.2 roadmap.
Citation
Roux de Bezieux, H. et al. Trajectory inference across multiple conditions with condiments. Nature Communications 15, 1281 (2024).
License
MIT.
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 pycondiments-0.1.0.tar.gz.
File metadata
- Download URL: pycondiments-0.1.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db567565f38bbdf6cfa8c809e42c01c9835e2a9dd918ad1866367e5695b11fbc
|
|
| MD5 |
a85065ba6617915083878804c49ce992
|
|
| BLAKE2b-256 |
e65fd90e86e4d2fff5687894575182678a4db6c3aee72a1e2e67b77fb1823d02
|
File details
Details for the file pycondiments-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pycondiments-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b491cba36598ebcfa46386acc54d6fe9c9895b0c4d4c2894aa1d5a441dc3234a
|
|
| MD5 |
b825c446b059bb4e3e24cc4fe8fb8fb3
|
|
| BLAKE2b-256 |
c4aef4439a0b412c5383de0fafdf7e336f398d3f7a4a2451a01b3631d2237c8e
|