Skip to main content

a package for computing and maximizing phylogenetic diversity in phylogenetic networks

Project description

PyPI License Docs

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_diversity dispatching 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

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

phypanda-2.0.0.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

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

phypanda-2.0.0-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

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

Hashes for phypanda-2.0.0.tar.gz
Algorithm Hash digest
SHA256 2a5bfcf8a7bf966b90b3e6109da1613e618a54c3c0a1b9a9068bb0bd599edcc0
MD5 d342fc13999e866be775932140a93939
BLAKE2b-256 ef342ded0ee057f84b6a187e7ab99a0fa80516868f695db18354920d95a5c4d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for phypanda-2.0.0.tar.gz:

Publisher: release.yml on nholtgrefe/panda

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

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

Hashes for phypanda-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cec22933a5dc9c902df967fda62c940bb080737ef64ce8e7b545c7ca5d64d53
MD5 bab208815acc408ced81a1a7b3c6e0b6
BLAKE2b-256 ffaa35925152be1885034d658fff26a026f8ff2b2887b0f845584c936bbac0a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for phypanda-2.0.0-py3-none-any.whl:

Publisher: release.yml on nholtgrefe/panda

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