Skip to main content

package containing the PaNDA framework for exploring, visualizing and maximizing phylogenetic diversity in phylogenetic networks

Project description

phypanda

phypanda is a Python package that contains PaNDA (Phylogenetic Network Diversity Algorithms): a software framework for exploring, visualizing and maximizing phylogenetic diversity in phylogenetic networks.

List of important features

  • Maximizing all-paths diversity in a rooted phylogenetic network
  • Computing the all-paths diversity for a given set of taxa in a rooted phylogenetic network
  • Greedily select a set of taxa with large all-paths diversity

Installation

If you have an up-to-date version of Python installed on your device, the standard package manager pip should come pre-installed. Then, you can install phypanda from PyPI by simply using the following command in a terminal:

python -m pip install phypanda

Example usage

Importing the package

To get started with phypanda, open a Python shell and import the package with:

import phypanda as ppa

Maximizing all-paths diversity

To maximize the all-paths diversity of a rooted network (given in eNewick format) for a set of k taxa, use the function solve_MAPPD. For example, when finding a set of 10 taxa with maximum all-paths diversity in the Xiphophorus network from the PaNDA paper, run:

enewick = '((((((((((Xgordoni:1.3295084631587457,Xmeyeri:1.3295084631587457):0.0,Xcouchianus:1.329508093234352):6.999730834529853,Xvariatus:8.329238927764205):2.1769451514229345,Xevelynae:10.50618407918714):1.118605313770228,(Xxiphidium:7.2210504457107145,#H24:0.0):4.403738947246653):0.0,Xmilleri:11.624787067955268):4.296868586395352,Xandersi:15.92165565435062):0.9486610416497712,Xmaculatus:16.87031669600039):0.5723386247384958,((((Xmontezumae:7.221055986870681,(Xcortezi:5.485599585171238,((Xmalinche:5.485605240002155,Xbirchmanni:5.485605240002155):0.0)#H26:0.0):1.7354564016994427):0.0,((Xnigrensis:2.4303498026154564,Xmultilineatus:2.4303498026154564):0.19174715477323678,(Xpygmaeus:1.347820846400494,Xcontinens:1.347820846400494):1.2742761109881993):4.598960284156991):0.0,#H26:1.7354540549075645):0.0)#H24:10.2216024589192):2.1886232296055894,((Xclemenciae:11.254572014210282,Xmonticolus:11.254572014210282):6.4012991117391564,(#H25:1.6332001759073602,(Xsignum:10.266850863153604,((Xhellerii:8.633649976742058)#H25:1.6332013685506936,(Xalvarezi:8.362082334652573,Xmayae:8.362082334652573):1.9047690106401785):0.0):0.0):7.3890209733000205):1.975407424395037);'
k = 10
pd, taxa = ppa.solve_MAPPD(enewick, k)

To print the resulting maximum all-paths diversity and the selected taxa, run:

print(f"Maximum all-paths diversity for k = {k} is {pd}")
print("Selected taxa:", taxa)

For a complete overview of different methods and extra parameter options, please check the method descriptions in the source code of phypanda.

Citation

If you use phypanda, please cite the corresponding 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

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-1.0.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

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

phypanda-1.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file phypanda-1.0.tar.gz.

File metadata

  • Download URL: phypanda-1.0.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for phypanda-1.0.tar.gz
Algorithm Hash digest
SHA256 925760eecf6ee967057f24ce798e8fba183aa2b836752762b975a59d1ce14fe8
MD5 41c6bde3a068ec621c8c851fd892c7dd
BLAKE2b-256 9f43b562c1a5d628d282ee4a10a5c3ba911945501474e3ebb2439c13a44e6d2b

See more details on using hashes here.

File details

Details for the file phypanda-1.0-py3-none-any.whl.

File metadata

  • Download URL: phypanda-1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for phypanda-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a233c895074ff5c37ec5b9893e5d30b2926135a6da0152237b14173baa33764
MD5 273fac94b165ece3f5680aa8730b500b
BLAKE2b-256 408b24f66c12f924f76922b6944f778204f0771a358c044495dd5665c4b60989

See more details on using hashes here.

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