py-dynwrap
A Python port of dynverse/dynwrap (Saelens et al. Nat Biotechnol 2019) — the trajectory data wrapper used by the dynbenchmark / dyneval comparison framework.
- Pure NumPy/SciPy/NetworkX/pandas — no R, no rpy2, no docker
- byte-equivalent geodesic distances vs R (max|Δ| = 0.0 on canonical fixture)
- v0.1 scope: data structures + topology utilities + geodesic distances — the minimum needed for
pydyneval::calculate_metrics
Install
pip install pydynwrap-bio
Quick-start
import pydynwrap as dw
import pandas as pd, numpy as np
# Build a 3-branch bifurcation trajectory
ds = dw.wrap_data(cell_ids=[f"c{i}" for i in range(30)])
ds = dw.add_branch_trajectory(
ds,
pseudotime=np.tile(np.linspace(0,1,10), 3),
branch=np.repeat(["A","B","C"], 10),
)
# Geodesic distance matrix (every cell vs every cell)
gd = dw.calculate_geodesic_distances(ds, directed=False)
Function map
| Python | R dynwrap:: |
Status |
|---|---|---|
wrap_data |
wrap_data |
✅ |
add_trajectory |
add_trajectory |
✅ |
add_linear_trajectory |
add_linear_trajectory |
✅ |
add_branch_trajectory |
add_branch_trajectory |
✅ |
add_cluster_graph |
add_cluster_graph |
✅ |
add_pseudotime / add_grouping / add_dimred / add_expression |
same | ✅ |
add_cell_waypoints |
add_cell_waypoints |
✅ |
convert_progressions_to_milestone_percentages |
same | ✅ |
convert_milestone_percentages_to_progressions |
same | ✅ |
calculate_geodesic_distances |
same | ✅ (byte-equivalent) |
classify_milestone_network |
same | ✅ |
simplify_trajectory |
same | ⏳ v0.2 (stub) |
is_wrapper_with_trajectory etc. predicates |
same | ✅ |
Method runners (infer_trajectory, ti_* containers) |
— | ⛔ v0.3+ (need babelwhale/docker) |
align_to_* cross-trajectory comparison |
— | ⏳ v0.2 |
Coverage: 14/91 R exports — the core data-wrapping API. Method-running (the dynbenchmark TI runners) is the remaining 60+ exports, deferred per Phase 0.5 scoping.
Citation
Saelens, W. et al. A comparison of single-cell trajectory inference methods. Nat Biotechnol 37, 547–554 (2019).
License
MIT (matches upstream dynwrap MIT).
Metadata
Release files for pydynwrap-bio 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pydynwrap_bio-0.1.0.tar.gz | 14.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydynwrap_bio-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.8 kB
Release files / pydynwrap_bio-0.1.0.tar.gz
| Download URL | pydynwrap_bio-0.1.0.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25b038dad2b84ffae34d495c07579c6ac7ab15656864c06b9fb76441bb367fae
|
|
BLAKE2b-256 checksum How to use checksums |
ef9d71db69ee07e8e932c8ac49af5ab53218f01e769bfa4fb83fefefd8c7c457
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logRelease files / pydynwrap_bio-0.1.0-py3-none-any.whl
| Download URL | pydynwrap_bio-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e78f470534a2624d34533b882de3c28ed8dd28aae0c16093f69a1322a19ce8c8
|
|
BLAKE2b-256 checksum How to use checksums |
e024c4268224525f34bdcee01a642451a3a991611daec255034e14e389f5e807
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logSecurity for pydynwrap-bio 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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pydynwrap_bio-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logA 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.