a package for computing and maximizing phylogenetic diversity in phylogenetic networks
Project description
phypanda
phypanda is the Python library for PaNDA — phylogenetic diversity optimization on directed phylogenetic networks. It builds on phylozoo for networks and scanwidth for node- and edge-scanwidth–based dynamic programs, including budgeted maximum all-paths diversity (MAPD) and related max-tree / min-tree objectives.
Key features
- All-paths (MAPD): fixed-set scoring and budgeted maximization via node-scanwidth FPT (
nsw_fpt_budget) and edge-scanwidth FPT (esw_fpt), with optional precomputed tree extensions. - Max-tree and min-tree PD: budgeted max-tree PD and fixed-set min-tree PD using node-scanwidth DPs (Numba-accelerated merges where applicable).
- High-level API:
diversity,marginal_diversities,greedy_max_diversity,solve_max_diversitydispatching over measure implementations. - GUI: optional desktop interface for interactive exploration — see the
gui/folder.
Installation
Install the package from PyPI:
pip install phypanda
From a local clone (editable install):
pip install -e .
Optional extras:
# development (pytest)
pip install phypanda[dev]
# build the Sphinx documentation
pip install phypanda[docs]
Runtime dependencies (installed automatically) include phylozoo, networkx, scanwidth, and numba. Several solvers require networks without parallel edges; see the documentation.
Documentation
Installation, quickstart, measure overview, and full API reference:
https://nholtgrefe.github.io/panda/
(Site is deployed from this repository; if a page is not live yet, build locally with pip install -e ".[docs]" and sphinx-build -b html docs/source docs/build/html — see docs/README.md.)
Maintainers: publishing to PyPI and deploying docs use separate GitHub Actions workflows on a v* tag (docs can also be run manually); see RELEASING.md.
Using PaNDA beyond the library
- GUI: gui/README.md — screenshots and Tk-based workflow.
- Example network: Xiphophorus eNewick in
experiments/MAPPD/exp2_xiphophorus_network.txt. - Experiments & data: experiments/ — MAPPD simulation materials under
experiments/MAPPD/, budgeted PD benchmarks underexperiments/budgeted_PD/.
Citation
If you use phypanda or this repository, please cite the main PaNDA paper:
PaNDA: Efficient Optimization of Phylogenetic Diversity in Networks.
Niels Holtgrefe, Leo van Iersel, Ruben Meuwese, Yukihiro Murakami, Jannik Schestag.
bioRxiv, 2025. doi: 10.1101/2025.11.14.688467
Several additional budgeted algorithms (notably node-scanwidth FPT formulations for phylogenetic diversity on networks) are described in:
Tractable Optimization of Budgeted Phylogenetic Diversity on Networks using Node-Scanwidth.
Niels Holtgrefe and Jannik Schestag.
Cite this second reference when your work builds specifically on those node-scanwidth optimization results.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phypanda-2.0.0.tar.gz.
File metadata
- Download URL: phypanda-2.0.0.tar.gz
- Upload date:
- Size: 31.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a5bfcf8a7bf966b90b3e6109da1613e618a54c3c0a1b9a9068bb0bd599edcc0
|
|
| MD5 |
d342fc13999e866be775932140a93939
|
|
| BLAKE2b-256 |
ef342ded0ee057f84b6a187e7ab99a0fa80516868f695db18354920d95a5c4d3
|
Provenance
The following attestation bundles were made for phypanda-2.0.0.tar.gz:
Publisher:
release.yml on nholtgrefe/panda
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phypanda-2.0.0.tar.gz -
Subject digest:
2a5bfcf8a7bf966b90b3e6109da1613e618a54c3c0a1b9a9068bb0bd599edcc0 - Sigstore transparency entry: 1493969453
- Sigstore integration time:
-
Permalink:
nholtgrefe/panda@8ead708ed32036f9ac4891262e4c2c2533684929 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/nholtgrefe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ead708ed32036f9ac4891262e4c2c2533684929 -
Trigger Event:
push
-
Statement type:
File details
Details for the file phypanda-2.0.0-py3-none-any.whl.
File metadata
- Download URL: phypanda-2.0.0-py3-none-any.whl
- Upload date:
- Size: 31.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cec22933a5dc9c902df967fda62c940bb080737ef64ce8e7b545c7ca5d64d53
|
|
| MD5 |
bab208815acc408ced81a1a7b3c6e0b6
|
|
| BLAKE2b-256 |
ffaa35925152be1885034d658fff26a026f8ff2b2887b0f845584c936bbac0a5
|
Provenance
The following attestation bundles were made for phypanda-2.0.0-py3-none-any.whl:
Publisher:
release.yml on nholtgrefe/panda
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phypanda-2.0.0-py3-none-any.whl -
Subject digest:
7cec22933a5dc9c902df967fda62c940bb080737ef64ce8e7b545c7ca5d64d53 - Sigstore transparency entry: 1493969537
- Sigstore integration time:
-
Permalink:
nholtgrefe/panda@8ead708ed32036f9ac4891262e4c2c2533684929 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/nholtgrefe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ead708ed32036f9ac4891262e4c2c2533684929 -
Trigger Event:
push
-
Statement type: