Skip to main content

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)

  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.

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

pycondiments-0.1.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

pycondiments-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

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

Hashes for pycondiments-0.1.0.tar.gz
Algorithm Hash digest
SHA256 db567565f38bbdf6cfa8c809e42c01c9835e2a9dd918ad1866367e5695b11fbc
MD5 a85065ba6617915083878804c49ce992
BLAKE2b-256 e65fd90e86e4d2fff5687894575182678a4db6c3aee72a1e2e67b77fb1823d02

See more details on using hashes here.

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

Hashes for pycondiments-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b491cba36598ebcfa46386acc54d6fe9c9895b0c4d4c2894aa1d5a441dc3234a
MD5 b825c446b059bb4e3e24cc4fe8fb8fb3
BLAKE2b-256 c4aef4439a0b412c5383de0fafdf7e336f398d3f7a4a2451a01b3631d2237c8e

See more details on using hashes here.

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