Skip to main content

Pure-Python port of dynwrap — single-cell trajectory data wrapper (Saelens et al. Nat Biotechnol 2019).

Project description

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).

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

pydynwrap_bio-0.1.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

pydynwrap_bio-0.1.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file pydynwrap_bio-0.1.0.tar.gz.

File metadata

  • Download URL: pydynwrap_bio-0.1.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pydynwrap_bio-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25b038dad2b84ffae34d495c07579c6ac7ab15656864c06b9fb76441bb367fae
MD5 08aafbf267644b66a4a64995d39ac6d7
BLAKE2b-256 ef9d71db69ee07e8e932c8ac49af5ab53218f01e769bfa4fb83fefefd8c7c457

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydynwrap_bio-0.1.0.tar.gz:

Publisher: publish.yml on omicverse/py-dynwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pydynwrap_bio-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pydynwrap_bio-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pydynwrap_bio-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e78f470534a2624d34533b882de3c28ed8dd28aae0c16093f69a1322a19ce8c8
MD5 30be5aa4ead6ffc581fe135a8b0953fe
BLAKE2b-256 e024c4268224525f34bdcee01a642451a3a991611daec255034e14e389f5e807

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydynwrap_bio-0.1.0-py3-none-any.whl:

Publisher: publish.yml on omicverse/py-dynwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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