py-dyneval
A Python port of dynverse/dyneval (Saelens et al. Nat Biotechnol 2019) — the metric library used by the dynbenchmark trajectory inference benchmark.
- Pure NumPy / SciPy / NetworkX / scikit-learn — no R
- Depends on
pydynwrapfor trajectory wrappers + geodesic distances - 8/14 dyneval metric IDs ported in v0.1
Install
pip install pydyneval-bio # pulls in pydynwrap-bio
Quick-start
import pydyneval as de
import pydynwrap as dw
import numpy as np
gold = dw.wrap_data([f"c{i}" for i in range(30)])
gold = dw.add_branch_trajectory(gold,
pseudotime=np.tile(np.linspace(0,1,10), 3),
branch=np.repeat(["A","B","C"], 10))
pred = dw.wrap_data([f"c{i}" for i in range(30)])
pred = dw.add_branch_trajectory(pred,
pseudotime=np.tile(np.linspace(0,1,10), 3),
branch=np.repeat(["A","B","C"], 10))
scores = de.calculate_metrics(gold, pred)
print(scores)
# correlation him edge_flip isomorphic F1_branches F1_milestones ...
# 0 1.0 1.0 1.0 1.0 1.0 1.0
Function map
| Python | R dyneval:: |
Status |
|---|---|---|
calculate_metrics(dataset, model, metrics=...) |
same | ✅ |
calculate_him(net1, net2) |
same | ✅ (Lorentzian inline) |
calculate_edge_flip(net1, net2) |
same | ✅ (Jaccard surrogate) |
calculate_isomorphic(net1, net2) |
(implicit) | ✅ |
calculate_mapping_branches(dataset, prediction) |
same | ✅ |
calculate_mapping_milestones(dataset, prediction) |
same | ✅ |
calculate_featureimp_cor(dataset, model) |
same | ✅ |
calculate_featureimp_enrichment (ks / wilcox) |
— | ⏳ v0.2 |
calculate_position_predict (rf_mse / rf_rsq / lm_*) |
— | ⏳ v0.2 |
evaluate_ti_method |
— | ⛔ v0.3+ (depends on TI runners) |
R parity on canonical fixture (3-branch, 30 cells × 50 genes)
| Metric | R | Py | |Δ| | |---|---|---|---| | correlation | 0.9812 | 0.9813 | 0.0001 | | him | 1.0 | 1.0 | 0.0 | | edge_flip | 1.0 | 1.0 | 0.0 | | isomorphic | 1.0 | 1.0 | 0.0 | | F1_branches | 1.0 | 1.0 | 0.0 | | F1_milestones | 0.6667 | 0.6667 | 0.0 | | featureimp_cor | 0.9622 | 0.9005 | 0.0617 | | featureimp_wcor | 0.9664 | 0.9548 | 0.0115 |
featureimp_* differs slightly because of Random Forest non-determinism
between R randomForest and sklearn RandomForestRegressor — both
implement Breiman 2001 with the same hyperparameters; tree-splitting RNG
differs.
Citation
Saelens, W. et al. A comparison of single-cell trajectory inference methods. Nat Biotechnol 37, 547–554 (2019).
License
MIT.
Metadata
Release files for pydyneval-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 | |
|---|---|---|---|---|
| pydyneval_bio-0.1.0.tar.gz | 12.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydyneval_bio-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.5 kB
Release files / pydyneval_bio-0.1.0.tar.gz
| Download URL | pydyneval_bio-0.1.0.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
513e4598982cf650744288ef843411cb7f00f73c6a0eea06d9a8e1ff2bc1ebe1
|
|
BLAKE2b-256 checksum How to use checksums |
1009c4da20c672662f18774259ef6252c3cc38b03dfc335913aff8a2e4f3bf20
|
| 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 / pydyneval_bio-0.1.0-py3-none-any.whl
| Download URL | pydyneval_bio-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b1a61f43cf2a7c253f776c0c0e42d1dfb89bf5b56571d62ce7fe03347089a5a
|
|
BLAKE2b-256 checksum How to use checksums |
a6b6053b3cae2cbb3cabd698f02d10f052a69bbb8846f8aed3c01dc076083aee
|
| 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 pydyneval-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 pydyneval_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.