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.1.tar.gz (21.7 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.1-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: phypanda-1.0.1.tar.gz
  • Upload date:
  • Size: 21.7 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.1.tar.gz
Algorithm Hash digest
SHA256 0221af41ad7d98e650e23061e798339926d8e4fb3898925b976bb796b199ccc3
MD5 d788b314bcb9cbbffc00c0afafa89c4b
BLAKE2b-256 d344e40d04df69467b61731415d777295035662d8917000e9c365d25a975092f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phypanda-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 babb94155590d4789d5d5f8ac61201b021100f735b764f167c6f0f6a8c2c6838
MD5 108193b9be7fded0d409870dbd12961a
BLAKE2b-256 cb70fb2486c4af99d838d8950877a06e8b03c4cec10f58864722c1c257b66620

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