Skip to main content

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)

  1. topologyTest is approximate: uses χ² on dominant-lineage contingency rather than re-fitting Slingshot per condition. Strong topology changes will be missed.
  2. No GAM smoothing in imbalance_score: R uses mgcv s(); we use kNN-average. Both give similar smoothed z-scores.
  3. 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.

Metadata

Release files for pycondiments 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycondiments 0.1.0
File Size Uploaded Provenance
pycondiments-0.1.0.tar.gz 10.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pycondiments 0.1.0
File Interpreter ABI Platform
pycondiments-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.1 kB

Release files / pycondiments-0.1.0.tar.gz

Download URL pycondiments-0.1.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
db567565f38bbdf6cfa8c809e42c01c9835e2a9dd918ad1866367e5695b11fbc
BLAKE2b-256 checksum
How to use checksums
e65fd90e86e4d2fff5687894575182678a4db6c3aee72a1e2e67b77fb1823d02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release files / pycondiments-0.1.0-py3-none-any.whl

Download URL pycondiments-0.1.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b491cba36598ebcfa46386acc54d6fe9c9895b0c4d4c2894aa1d5a441dc3234a
BLAKE2b-256 checksum
How to use checksums
c4aef4439a0b412c5383de0fafdf7e336f398d3f7a4a2451a01b3631d2237c8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Security for pycondiments 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page