phypanda 1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- phypanda-1.0/LICENSE +21 -0
- phypanda-1.0/PKG-INFO +69 -0
- phypanda-1.0/README.md +52 -0
- phypanda-1.0/pyproject.toml +24 -0
- phypanda-1.0/setup.cfg +32 -0
- phypanda-1.0/src/phypanda/__init__.py +2 -0
- phypanda-1.0/src/phypanda/mappd.py +614 -0
- phypanda-1.0/src/phypanda/scanwidth.py +1062 -0
- phypanda-1.0/src/phypanda.egg-info/PKG-INFO +69 -0
- phypanda-1.0/src/phypanda.egg-info/SOURCES.txt +12 -0
- phypanda-1.0/src/phypanda.egg-info/dependency_links.txt +1 -0
- phypanda-1.0/src/phypanda.egg-info/requires.txt +4 -0
- phypanda-1.0/src/phypanda.egg-info/top_level.txt +1 -0
phypanda-1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 N. Holtgrefe
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
phypanda-1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: phypanda
|
|
3
|
+
Version: 1.0
|
|
4
|
+
Summary: package containing the PaNDA framework for exploring, visualizing and maximizing phylogenetic diversity in phylogenetic networks
|
|
5
|
+
Home-page: https://github.com/nholtgrefe/panda/tree/main/phypanda
|
|
6
|
+
Author: N. Holtgrefe
|
|
7
|
+
Author-email: "N. Holtgrefe" <n.a.l.holtgrefe@tudelft.nl>
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Requires-Python: >=3.7
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: physquirrel<=1.1
|
|
13
|
+
Requires-Dist: numpy>=2.0
|
|
14
|
+
Requires-Dist: networkx>=3.0
|
|
15
|
+
Requires-Dist: matplotlib>=3.7
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
# `phypanda`
|
|
19
|
+
`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.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## List of important features
|
|
23
|
+
- Maximizing all-paths diversity in a rooted phylogenetic network
|
|
24
|
+
- Computing the all-paths diversity for a given set of taxa in a rooted phylogenetic network
|
|
25
|
+
- Greedily select a set of taxa with large all-paths diversity
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
If you have an up-to-date version of [Python](https://www.python.org/downloads/) installed on your device, the standard package manager `pip` should come pre-installed. Then, you can install `phypanda` from [PyPI](https://pypi.org/project/phypanda/) by simply using the following command in a terminal:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
python -m pip install phypanda
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## Example usage
|
|
36
|
+
|
|
37
|
+
### Importing the package
|
|
38
|
+
To get started with `phypanda`, open a Python shell and import the package with:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
import phypanda as ppa
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Maximizing all-paths diversity
|
|
45
|
+
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](https://github.com/nholtgrefe/panda/blob/main/data/exp2_xiphophorus_network.txt) from the PaNDA paper, run:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
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);'
|
|
49
|
+
k = 10
|
|
50
|
+
pd, taxa = ppa.solve_MAPPD(enewick, k)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
To print the resulting maximum all-paths diversity and the selected taxa, run:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
print(f"Maximum all-paths diversity for k = {k} is {pd}")
|
|
57
|
+
print("Selected taxa:", taxa)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
For a complete overview of different methods and extra parameter options, please check the method descriptions in the [source code](https://github.com/nholtgrefe/panda/tree/main/phypanda/src/phypanda) of `phypanda`.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## Citation
|
|
65
|
+
If you use `phypanda`, please cite the corresponding paper:
|
|
66
|
+
|
|
67
|
+
> **PaNDA: Efficient Optimization of Phylogenetic Diversity in Networks**.
|
|
68
|
+
> *Niels Holtgrefe, Leo van Iersel, Ruben Meuwese, Yukihiro Murakami, Jannik Schestag.*
|
|
69
|
+
> bioRxiv, 2025. doi: [10.1101/2025.11.14.688467](https://www.biorxiv.org/content/10.1101/2025.11.14.688467)
|
phypanda-1.0/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# `phypanda`
|
|
2
|
+
`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.
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## List of important features
|
|
6
|
+
- Maximizing all-paths diversity in a rooted phylogenetic network
|
|
7
|
+
- Computing the all-paths diversity for a given set of taxa in a rooted phylogenetic network
|
|
8
|
+
- Greedily select a set of taxa with large all-paths diversity
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
If you have an up-to-date version of [Python](https://www.python.org/downloads/) installed on your device, the standard package manager `pip` should come pre-installed. Then, you can install `phypanda` from [PyPI](https://pypi.org/project/phypanda/) by simply using the following command in a terminal:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
python -m pip install phypanda
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Example usage
|
|
19
|
+
|
|
20
|
+
### Importing the package
|
|
21
|
+
To get started with `phypanda`, open a Python shell and import the package with:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
import phypanda as ppa
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Maximizing all-paths diversity
|
|
28
|
+
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](https://github.com/nholtgrefe/panda/blob/main/data/exp2_xiphophorus_network.txt) from the PaNDA paper, run:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
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);'
|
|
32
|
+
k = 10
|
|
33
|
+
pd, taxa = ppa.solve_MAPPD(enewick, k)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
To print the resulting maximum all-paths diversity and the selected taxa, run:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
print(f"Maximum all-paths diversity for k = {k} is {pd}")
|
|
40
|
+
print("Selected taxa:", taxa)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
For a complete overview of different methods and extra parameter options, please check the method descriptions in the [source code](https://github.com/nholtgrefe/panda/tree/main/phypanda/src/phypanda) of `phypanda`.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Citation
|
|
48
|
+
If you use `phypanda`, please cite the corresponding paper:
|
|
49
|
+
|
|
50
|
+
> **PaNDA: Efficient Optimization of Phylogenetic Diversity in Networks**.
|
|
51
|
+
> *Niels Holtgrefe, Leo van Iersel, Ruben Meuwese, Yukihiro Murakami, Jannik Schestag.*
|
|
52
|
+
> bioRxiv, 2025. doi: [10.1101/2025.11.14.688467](https://www.biorxiv.org/content/10.1101/2025.11.14.688467)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "phypanda"
|
|
7
|
+
version = "1.0"
|
|
8
|
+
description = "package containing the PaNDA framework for exploring, visualizing and maximizing phylogenetic diversity in phylogenetic networks"
|
|
9
|
+
authors = [
|
|
10
|
+
{ name = "N. Holtgrefe", email = "n.a.l.holtgrefe@tudelft.nl" }
|
|
11
|
+
]
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.7"
|
|
14
|
+
classifiers = ["License :: OSI Approved :: MIT License"]
|
|
15
|
+
|
|
16
|
+
dependencies = [
|
|
17
|
+
"physquirrel <= 1.1",
|
|
18
|
+
"numpy >= 2.0",
|
|
19
|
+
"networkx >= 3.0",
|
|
20
|
+
"matplotlib >= 3.7",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[tool.setuptools.packages.find]
|
|
24
|
+
where = ["src"]
|
phypanda-1.0/setup.cfg
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[metadata]
|
|
2
|
+
name = phypanda
|
|
3
|
+
version = 1.0
|
|
4
|
+
author = N. Holtgrefe
|
|
5
|
+
author_email = n.a.l.holtgrefe@tudelft.nl
|
|
6
|
+
description = package containing the PaNDA framework for exploring, visualizing and maximizing phylogenetic diversity in phylogenetic networks
|
|
7
|
+
long_description = file: README.md
|
|
8
|
+
long_description_content_type = text/markdown
|
|
9
|
+
url = https://github.com/nholtgrefe/panda/tree/main/phypanda
|
|
10
|
+
classifiers =
|
|
11
|
+
Programming Language :: Python :: 3
|
|
12
|
+
License :: OSI Approved :: MIT License
|
|
13
|
+
Operating System :: OS Independent
|
|
14
|
+
|
|
15
|
+
[options]
|
|
16
|
+
package_dir =
|
|
17
|
+
= src
|
|
18
|
+
packages = find:
|
|
19
|
+
python_requires = >=3.6
|
|
20
|
+
install_requires =
|
|
21
|
+
physquirrel <= 1.1
|
|
22
|
+
numpy >= 1.20
|
|
23
|
+
networkx >= 3.0
|
|
24
|
+
matplotlib >= 3.7
|
|
25
|
+
|
|
26
|
+
[options.packages.find]
|
|
27
|
+
where = src
|
|
28
|
+
|
|
29
|
+
[egg_info]
|
|
30
|
+
tag_build =
|
|
31
|
+
tag_date = 0
|
|
32
|
+
|