phylozoo 0.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.
Files changed (143) hide show
  1. phylozoo-0.1.0/LICENSE.md +9 -0
  2. phylozoo-0.1.0/PKG-INFO +82 -0
  3. phylozoo-0.1.0/README.md +40 -0
  4. phylozoo-0.1.0/pyproject.toml +103 -0
  5. phylozoo-0.1.0/setup.cfg +4 -0
  6. phylozoo-0.1.0/src/phylozoo/__init__.py +49 -0
  7. phylozoo-0.1.0/src/phylozoo/core/__init__.py +31 -0
  8. phylozoo-0.1.0/src/phylozoo/core/distance/__init__.py +20 -0
  9. phylozoo-0.1.0/src/phylozoo/core/distance/base.py +463 -0
  10. phylozoo-0.1.0/src/phylozoo/core/distance/classifications.py +365 -0
  11. phylozoo-0.1.0/src/phylozoo/core/distance/io.py +635 -0
  12. phylozoo-0.1.0/src/phylozoo/core/distance/operations.py +322 -0
  13. phylozoo-0.1.0/src/phylozoo/core/dnetwork.py +11 -0
  14. phylozoo-0.1.0/src/phylozoo/core/network/__init__.py +14 -0
  15. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/__init__.py +26 -0
  16. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/_enewick.py +1121 -0
  17. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/_utils.py +219 -0
  18. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/base.py +1580 -0
  19. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/classifications.py +846 -0
  20. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/conversions.py +144 -0
  21. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/derivations.py +1259 -0
  22. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/features.py +484 -0
  23. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/generator/__init__.py +27 -0
  24. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/generator/attachment.py +263 -0
  25. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/generator/base.py +543 -0
  26. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/generator/construction.py +449 -0
  27. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/generator/side.py +161 -0
  28. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/io.py +273 -0
  29. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/isomorphism.py +121 -0
  30. phylozoo-0.1.0/src/phylozoo/core/network/dnetwork/transformations.py +760 -0
  31. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/__init__.py +31 -0
  32. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/_utils.py +449 -0
  33. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/base.py +1658 -0
  34. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/classifications.py +730 -0
  35. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/conversions.py +172 -0
  36. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/derivations.py +1457 -0
  37. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/features.py +386 -0
  38. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/generator/__init__.py +28 -0
  39. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/generator/attachment.py +310 -0
  40. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/generator/base.py +500 -0
  41. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/generator/construction.py +191 -0
  42. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/generator/side.py +91 -0
  43. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/io.py +303 -0
  44. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/isomorphism.py +122 -0
  45. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/sd_phynetwork.py +566 -0
  46. phylozoo-0.1.0/src/phylozoo/core/network/sdnetwork/transformations.py +280 -0
  47. phylozoo-0.1.0/src/phylozoo/core/primitives/__init__.py +20 -0
  48. phylozoo-0.1.0/src/phylozoo/core/primitives/circular_ordering.py +719 -0
  49. phylozoo-0.1.0/src/phylozoo/core/primitives/d_multigraph/__init__.py +18 -0
  50. phylozoo-0.1.0/src/phylozoo/core/primitives/d_multigraph/base.py +1295 -0
  51. phylozoo-0.1.0/src/phylozoo/core/primitives/d_multigraph/conversions.py +89 -0
  52. phylozoo-0.1.0/src/phylozoo/core/primitives/d_multigraph/features.py +433 -0
  53. phylozoo-0.1.0/src/phylozoo/core/primitives/d_multigraph/io.py +680 -0
  54. phylozoo-0.1.0/src/phylozoo/core/primitives/d_multigraph/isomorphism.py +199 -0
  55. phylozoo-0.1.0/src/phylozoo/core/primitives/d_multigraph/transformations.py +480 -0
  56. phylozoo-0.1.0/src/phylozoo/core/primitives/m_multigraph/__init__.py +19 -0
  57. phylozoo-0.1.0/src/phylozoo/core/primitives/m_multigraph/base.py +1768 -0
  58. phylozoo-0.1.0/src/phylozoo/core/primitives/m_multigraph/conversions.py +177 -0
  59. phylozoo-0.1.0/src/phylozoo/core/primitives/m_multigraph/features.py +719 -0
  60. phylozoo-0.1.0/src/phylozoo/core/primitives/m_multigraph/io.py +570 -0
  61. phylozoo-0.1.0/src/phylozoo/core/primitives/m_multigraph/isomorphism.py +251 -0
  62. phylozoo-0.1.0/src/phylozoo/core/primitives/m_multigraph/transformations.py +861 -0
  63. phylozoo-0.1.0/src/phylozoo/core/primitives/partition.py +475 -0
  64. phylozoo-0.1.0/src/phylozoo/core/quartet/__init__.py +20 -0
  65. phylozoo-0.1.0/src/phylozoo/core/quartet/base.py +363 -0
  66. phylozoo-0.1.0/src/phylozoo/core/quartet/qdistance.py +422 -0
  67. phylozoo-0.1.0/src/phylozoo/core/quartet/qprofile.py +470 -0
  68. phylozoo-0.1.0/src/phylozoo/core/quartet/qprofileset.py +499 -0
  69. phylozoo-0.1.0/src/phylozoo/core/sdnetwork.py +11 -0
  70. phylozoo-0.1.0/src/phylozoo/core/sequence/__init__.py +23 -0
  71. phylozoo-0.1.0/src/phylozoo/core/sequence/base.py +537 -0
  72. phylozoo-0.1.0/src/phylozoo/core/sequence/bootstrap.py +222 -0
  73. phylozoo-0.1.0/src/phylozoo/core/sequence/distances.py +109 -0
  74. phylozoo-0.1.0/src/phylozoo/core/sequence/io.py +394 -0
  75. phylozoo-0.1.0/src/phylozoo/core/split/__init__.py +30 -0
  76. phylozoo-0.1.0/src/phylozoo/core/split/algorithms.py +440 -0
  77. phylozoo-0.1.0/src/phylozoo/core/split/base.py +116 -0
  78. phylozoo-0.1.0/src/phylozoo/core/split/classifications.py +259 -0
  79. phylozoo-0.1.0/src/phylozoo/core/split/io.py +587 -0
  80. phylozoo-0.1.0/src/phylozoo/core/split/splitsystem.py +230 -0
  81. phylozoo-0.1.0/src/phylozoo/core/split/weighted_splitsystem.py +323 -0
  82. phylozoo-0.1.0/src/phylozoo/utils/__init__.py +9 -0
  83. phylozoo-0.1.0/src/phylozoo/utils/exceptions/__init__.py +103 -0
  84. phylozoo-0.1.0/src/phylozoo/utils/exceptions/algorithm.py +18 -0
  85. phylozoo-0.1.0/src/phylozoo/utils/exceptions/base.py +28 -0
  86. phylozoo-0.1.0/src/phylozoo/utils/exceptions/general.py +82 -0
  87. phylozoo-0.1.0/src/phylozoo/utils/exceptions/generator.py +31 -0
  88. phylozoo-0.1.0/src/phylozoo/utils/exceptions/io.py +46 -0
  89. phylozoo-0.1.0/src/phylozoo/utils/exceptions/network.py +61 -0
  90. phylozoo-0.1.0/src/phylozoo/utils/exceptions/utils.py +63 -0
  91. phylozoo-0.1.0/src/phylozoo/utils/exceptions/visualization.py +58 -0
  92. phylozoo-0.1.0/src/phylozoo/utils/exceptions/warning.py +56 -0
  93. phylozoo-0.1.0/src/phylozoo/utils/io/__init__.py +19 -0
  94. phylozoo-0.1.0/src/phylozoo/utils/io/file_ops.py +113 -0
  95. phylozoo-0.1.0/src/phylozoo/utils/io/format_utils/__init__.py +29 -0
  96. phylozoo-0.1.0/src/phylozoo/utils/io/format_utils/nexus.py +137 -0
  97. phylozoo-0.1.0/src/phylozoo/utils/io/format_utils/phylip.py +93 -0
  98. phylozoo-0.1.0/src/phylozoo/utils/io/mixin.py +258 -0
  99. phylozoo-0.1.0/src/phylozoo/utils/io/registry.py +148 -0
  100. phylozoo-0.1.0/src/phylozoo/utils/parallel.py +487 -0
  101. phylozoo-0.1.0/src/phylozoo/utils/validation.py +300 -0
  102. phylozoo-0.1.0/src/phylozoo/viz/__init__.py +12 -0
  103. phylozoo-0.1.0/src/phylozoo/viz/_dispatch.py +100 -0
  104. phylozoo-0.1.0/src/phylozoo/viz/_layout_utils.py +155 -0
  105. phylozoo-0.1.0/src/phylozoo/viz/_matplotlib.py +21 -0
  106. phylozoo-0.1.0/src/phylozoo/viz/_render.py +438 -0
  107. phylozoo-0.1.0/src/phylozoo/viz/_types.py +183 -0
  108. phylozoo-0.1.0/src/phylozoo/viz/d_multigraph/__init__.py +13 -0
  109. phylozoo-0.1.0/src/phylozoo/viz/d_multigraph/layout/__init__.py +6 -0
  110. phylozoo-0.1.0/src/phylozoo/viz/d_multigraph/layout/base.py +46 -0
  111. phylozoo-0.1.0/src/phylozoo/viz/d_multigraph/layout/nx.py +84 -0
  112. phylozoo-0.1.0/src/phylozoo/viz/d_multigraph/layout/routes.py +84 -0
  113. phylozoo-0.1.0/src/phylozoo/viz/d_multigraph/plot.py +107 -0
  114. phylozoo-0.1.0/src/phylozoo/viz/d_multigraph/style.py +71 -0
  115. phylozoo-0.1.0/src/phylozoo/viz/dnetwork/__init__.py +14 -0
  116. phylozoo-0.1.0/src/phylozoo/viz/dnetwork/layout/__init__.py +7 -0
  117. phylozoo-0.1.0/src/phylozoo/viz/dnetwork/layout/base.py +66 -0
  118. phylozoo-0.1.0/src/phylozoo/viz/dnetwork/layout/dag.py +273 -0
  119. phylozoo-0.1.0/src/phylozoo/viz/dnetwork/layout/nx.py +108 -0
  120. phylozoo-0.1.0/src/phylozoo/viz/dnetwork/layout/routes.py +137 -0
  121. phylozoo-0.1.0/src/phylozoo/viz/dnetwork/plot.py +127 -0
  122. phylozoo-0.1.0/src/phylozoo/viz/dnetwork/style.py +83 -0
  123. phylozoo-0.1.0/src/phylozoo/viz/m_multigraph/__init__.py +13 -0
  124. phylozoo-0.1.0/src/phylozoo/viz/m_multigraph/layout/__init__.py +6 -0
  125. phylozoo-0.1.0/src/phylozoo/viz/m_multigraph/layout/base.py +46 -0
  126. phylozoo-0.1.0/src/phylozoo/viz/m_multigraph/layout/nx.py +93 -0
  127. phylozoo-0.1.0/src/phylozoo/viz/m_multigraph/layout/routes.py +89 -0
  128. phylozoo-0.1.0/src/phylozoo/viz/m_multigraph/plot.py +109 -0
  129. phylozoo-0.1.0/src/phylozoo/viz/m_multigraph/style.py +47 -0
  130. phylozoo-0.1.0/src/phylozoo/viz/plot.py +79 -0
  131. phylozoo-0.1.0/src/phylozoo/viz/sdnetwork/__init__.py +14 -0
  132. phylozoo-0.1.0/src/phylozoo/viz/sdnetwork/layout/__init__.py +7 -0
  133. phylozoo-0.1.0/src/phylozoo/viz/sdnetwork/layout/base.py +60 -0
  134. phylozoo-0.1.0/src/phylozoo/viz/sdnetwork/layout/nx.py +101 -0
  135. phylozoo-0.1.0/src/phylozoo/viz/sdnetwork/layout/radial.py +246 -0
  136. phylozoo-0.1.0/src/phylozoo/viz/sdnetwork/layout/routes.py +89 -0
  137. phylozoo-0.1.0/src/phylozoo/viz/sdnetwork/plot.py +124 -0
  138. phylozoo-0.1.0/src/phylozoo/viz/sdnetwork/style.py +83 -0
  139. phylozoo-0.1.0/src/phylozoo.egg-info/PKG-INFO +82 -0
  140. phylozoo-0.1.0/src/phylozoo.egg-info/SOURCES.txt +141 -0
  141. phylozoo-0.1.0/src/phylozoo.egg-info/dependency_links.txt +1 -0
  142. phylozoo-0.1.0/src/phylozoo.egg-info/requires.txt +33 -0
  143. phylozoo-0.1.0/src/phylozoo.egg-info/top_level.txt +1 -0
@@ -0,0 +1,9 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2026 Niels Holtgrefe
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,82 @@
1
+ Metadata-Version: 2.4
2
+ Name: phylozoo
3
+ Version: 0.1.0
4
+ Summary: A phylogenetic networks analysis package
5
+ Author-email: Niels Holtgrefe <n.a.l.holtgrefe@tudelft.nl>
6
+ Classifier: License :: OSI Approved :: MIT License
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE.md
13
+ Requires-Dist: numpy>=1.20.0
14
+ Requires-Dist: numba>=0.56.0
15
+ Requires-Dist: networkx>=3.0.0
16
+ Provides-Extra: viz
17
+ Requires-Dist: matplotlib>=3.5.0; extra == "viz"
18
+ Provides-Extra: graphviz
19
+ Requires-Dist: matplotlib>=3.5.0; extra == "graphviz"
20
+ Requires-Dist: pygraphviz; extra == "graphviz"
21
+ Provides-Extra: test
22
+ Requires-Dist: pytest>=7.0.0; extra == "test"
23
+ Requires-Dist: pytest-cov>=4.0.0; extra == "test"
24
+ Requires-Dist: matplotlib>=3.5.0; extra == "test"
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
27
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
28
+ Requires-Dist: matplotlib>=3.5.0; extra == "dev"
29
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
30
+ Requires-Dist: black>=23.0.0; extra == "dev"
31
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
32
+ Provides-Extra: docs
33
+ Requires-Dist: sphinx>=7.0.0; extra == "docs"
34
+ Requires-Dist: sphinx-autobuild>=2023.0.0; extra == "docs"
35
+ Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "docs"
36
+ Requires-Dist: pydata-sphinx-theme>=0.15.0; extra == "docs"
37
+ Requires-Dist: sphinxcontrib-napoleon>=0.7; extra == "docs"
38
+ Requires-Dist: sphinx-copybutton>=0.5.0; extra == "docs"
39
+ Requires-Dist: sphinxcontrib-bibtex>=2.6.0; extra == "docs"
40
+ Requires-Dist: pybtex>=0.24.0; extra == "docs"
41
+ Dynamic: license-file
42
+
43
+
44
+ [![PyPI](https://img.shields.io/pypi/v/phylozoo)](https://pypi.org/project/phylozoo/)
45
+ [![License](https://img.shields.io/github/license/nholtgrefe/phylozoo)](https://github.com/nholtgrefe/phylozoo/blob/main/LICENSE.md)
46
+ [![Docs](https://img.shields.io/badge/docs-stable-blue)](https://nholtgrefe.github.io/phylozoo/)
47
+
48
+ <img src="https://github.com/nholtgrefe/phylozoo/blob/master/docs/source/_static/phylozoo_compact.svg" alt="PhyloZoo" width="375" align="left">
49
+
50
+ PhyloZoo is a Python package for working with phylogenetic networks and related evolutionary
51
+ data types. PhyloZoo aims to provide the foundational infrastructure for
52
+ phylogenetic network analysis in Python — a common framework that other packages can build on.
53
+
54
+ <br>
55
+
56
+ ## Key Features
57
+
58
+ - **Directed & semi-directed networks** — represent phylogenetic networks as fully directed rooted DAGs or as semi-directed/mixed graphs that allow root uncertainty. Both representations are validated on construction to guarantee well-formed phylogenetic objects. Includes a rich library of operations: network classifications, generators, conversions between representations, and much more.
59
+ - **Quartets, splits & distance matrices** — support for quartet systems, split systems, and pairwise distance matrices: the core building blocks for phylogenetic inference and comparison.
60
+ - **Multiple sequence alignments** — store and manipulate sequence data with efficient NumPy-backed arrays, including bootstrapping and site-pattern extraction.
61
+ - **Flexible visualization** — plot networks with different layouts and fine-grained control over styling, labels, and coloring via Matplotlib.
62
+ - **Standard file formats** — read and write common phylogenetic formats including eNewick, DOT, FASTA, and NEXUS, making it easy to integrate with existing workflows.
63
+ - **Performance** — leverages NumPy and optional Numba JIT compilation for computationally intensive algorithms.
64
+
65
+
66
+ ## Installation
67
+
68
+ To install the recommended version that includes vizualization, do:
69
+
70
+ ```bash
71
+ pip install phylozoo[viz]
72
+ ```
73
+
74
+ ## Documentation
75
+
76
+ For detailed documentation, installation instructions, tutorials, and API reference, visit the **[PhyloZoo docs](https://nholtgrefe.github.io/phylozoo/)**.
77
+
78
+ ## Citation
79
+
80
+ If you use PhyloZoo in your research, please cite:
81
+
82
+ > Niels Holtgrefe (2026). *PhyloZoo*. Available at: https://github.com/nholtgrefe/phylozoo
@@ -0,0 +1,40 @@
1
+
2
+ [![PyPI](https://img.shields.io/pypi/v/phylozoo)](https://pypi.org/project/phylozoo/)
3
+ [![License](https://img.shields.io/github/license/nholtgrefe/phylozoo)](https://github.com/nholtgrefe/phylozoo/blob/main/LICENSE.md)
4
+ [![Docs](https://img.shields.io/badge/docs-stable-blue)](https://nholtgrefe.github.io/phylozoo/)
5
+
6
+ <img src="https://github.com/nholtgrefe/phylozoo/blob/master/docs/source/_static/phylozoo_compact.svg" alt="PhyloZoo" width="375" align="left">
7
+
8
+ PhyloZoo is a Python package for working with phylogenetic networks and related evolutionary
9
+ data types. PhyloZoo aims to provide the foundational infrastructure for
10
+ phylogenetic network analysis in Python — a common framework that other packages can build on.
11
+
12
+ <br>
13
+
14
+ ## Key Features
15
+
16
+ - **Directed & semi-directed networks** — represent phylogenetic networks as fully directed rooted DAGs or as semi-directed/mixed graphs that allow root uncertainty. Both representations are validated on construction to guarantee well-formed phylogenetic objects. Includes a rich library of operations: network classifications, generators, conversions between representations, and much more.
17
+ - **Quartets, splits & distance matrices** — support for quartet systems, split systems, and pairwise distance matrices: the core building blocks for phylogenetic inference and comparison.
18
+ - **Multiple sequence alignments** — store and manipulate sequence data with efficient NumPy-backed arrays, including bootstrapping and site-pattern extraction.
19
+ - **Flexible visualization** — plot networks with different layouts and fine-grained control over styling, labels, and coloring via Matplotlib.
20
+ - **Standard file formats** — read and write common phylogenetic formats including eNewick, DOT, FASTA, and NEXUS, making it easy to integrate with existing workflows.
21
+ - **Performance** — leverages NumPy and optional Numba JIT compilation for computationally intensive algorithms.
22
+
23
+
24
+ ## Installation
25
+
26
+ To install the recommended version that includes vizualization, do:
27
+
28
+ ```bash
29
+ pip install phylozoo[viz]
30
+ ```
31
+
32
+ ## Documentation
33
+
34
+ For detailed documentation, installation instructions, tutorials, and API reference, visit the **[PhyloZoo docs](https://nholtgrefe.github.io/phylozoo/)**.
35
+
36
+ ## Citation
37
+
38
+ If you use PhyloZoo in your research, please cite:
39
+
40
+ > Niels Holtgrefe (2026). *PhyloZoo*. Available at: https://github.com/nholtgrefe/phylozoo
@@ -0,0 +1,103 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "phylozoo"
7
+ dynamic = ["version"]
8
+ authors = [
9
+ {name = "Niels Holtgrefe", email = "n.a.l.holtgrefe@tudelft.nl"},
10
+ ]
11
+ description = "A phylogenetic networks analysis package"
12
+ readme = "README.md"
13
+ requires-python = ">=3.10"
14
+ classifiers = [
15
+ "License :: OSI Approved :: MIT License",
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3.10",
18
+ "Programming Language :: Python :: 3.11",
19
+ ]
20
+ dependencies = [
21
+ "numpy>=1.20.0",
22
+ "numba>=0.56.0",
23
+ "networkx>=3.0.0",
24
+ ]
25
+
26
+ [project.optional-dependencies]
27
+ viz = [
28
+ "matplotlib>=3.5.0",
29
+ ]
30
+ graphviz = [
31
+ "matplotlib>=3.5.0",
32
+ "pygraphviz",
33
+ ]
34
+ test = [
35
+ "pytest>=7.0.0",
36
+ "pytest-cov>=4.0.0",
37
+ "matplotlib>=3.5.0",
38
+ ]
39
+ dev = [
40
+ "pytest>=7.0.0",
41
+ "pytest-cov>=4.0.0",
42
+ "matplotlib>=3.5.0",
43
+ "mypy>=1.0.0",
44
+ "black>=23.0.0",
45
+ "ruff>=0.1.0",
46
+ ]
47
+ docs = [
48
+ "sphinx>=7.0.0",
49
+ "sphinx-autobuild>=2023.0.0",
50
+ "sphinx-rtd-theme>=2.0.0",
51
+ "pydata-sphinx-theme>=0.15.0",
52
+ "sphinxcontrib-napoleon>=0.7",
53
+ "sphinx-copybutton>=0.5.0",
54
+ "sphinxcontrib-bibtex>=2.6.0",
55
+ "pybtex>=0.24.0",
56
+ ]
57
+
58
+ [tool.setuptools]
59
+ package-dir = {"" = "src"}
60
+
61
+ [tool.setuptools.dynamic]
62
+ version = {attr = "phylozoo.__version__"}
63
+
64
+ [tool.setuptools.packages.find]
65
+ where = ["src"]
66
+
67
+ [tool.pytest.ini_options]
68
+ testpaths = ["tests"]
69
+ python_files = ["test_*.py", "*_test.py"]
70
+ python_classes = ["Test*"]
71
+ python_functions = ["test_*"]
72
+ addopts = [
73
+ "-v",
74
+ "--strict-markers",
75
+ "--tb=short",
76
+ "--import-mode=importlib",
77
+ ]
78
+ filterwarnings = [
79
+ "ignore:Empty network.*no nodes.*:UserWarning",
80
+ "ignore:Single-node network.*:UserWarning",
81
+ "ignore:Validity is not fully checked for MixedPhyNetworks.*:UserWarning",
82
+ ]
83
+
84
+ [tool.mypy]
85
+ python_version = "3.10"
86
+ warn_return_any = true
87
+ warn_unused_configs = true
88
+ disallow_untyped_defs = false
89
+ disallow_incomplete_defs = false
90
+ check_untyped_defs = true
91
+ no_implicit_optional = true
92
+ warn_redundant_casts = true
93
+ warn_unused_ignores = true
94
+ warn_no_return = true
95
+
96
+ [tool.black]
97
+ line-length = 100
98
+ target-version = ['py310', 'py311']
99
+
100
+ [tool.ruff]
101
+ line-length = 100
102
+ target-version = "py310"
103
+
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,49 @@
1
+ """
2
+ PhyloZoo: A phylogenetic analysis package.
3
+
4
+ This package provides tools for working with phylogenetic networks, trees,
5
+ and related structures.
6
+ """
7
+
8
+ __version__ = "0.1.0"
9
+
10
+ # Import core classes for convenient access
11
+ from .core import (
12
+ # Networks
13
+ DirectedPhyNetwork,
14
+ SemiDirectedPhyNetwork,
15
+ # Structures
16
+ Split,
17
+ SplitSystem,
18
+ # Distance
19
+ DistanceMatrix,
20
+ # Sequence
21
+ MSA,
22
+ # Quartet
23
+ Quartet,
24
+ QuartetProfile,
25
+ QuartetProfileSet,
26
+ )
27
+
28
+ # Import alias modules to register them
29
+ # These allow: from phylozoo.core.dnetwork import ... instead of from phylozoo.core.network.dnetwork import ...
30
+ from .core import dnetwork # noqa: F401
31
+ from .core import sdnetwork # noqa: F401
32
+
33
+ __all__ = [
34
+ "__version__",
35
+ # Core - Networks
36
+ "DirectedPhyNetwork",
37
+ "SemiDirectedPhyNetwork",
38
+ # Core - Structures
39
+ "Split",
40
+ "SplitSystem",
41
+ # Core - Distance
42
+ "DistanceMatrix",
43
+ # Core - Sequence
44
+ "MSA",
45
+ # Core - Quartet
46
+ "Quartet",
47
+ "QuartetProfile",
48
+ "QuartetProfileSet",
49
+ ]
@@ -0,0 +1,31 @@
1
+ """
2
+ Core module for PhyloZoo.
3
+
4
+ This module contains fundamental data structures and classes used throughout
5
+ the package.
6
+ """
7
+
8
+ from .network import DirectedPhyNetwork, SemiDirectedPhyNetwork
9
+ from .split import Split, SplitSystem, WeightedSplitSystem
10
+ from .distance import DistanceMatrix
11
+ from .sequence import MSA
12
+ from .quartet import Quartet, QuartetProfile, QuartetProfileSet
13
+
14
+ __all__ = [
15
+ # Networks
16
+ "DirectedPhyNetwork",
17
+ "SemiDirectedPhyNetwork",
18
+ # Split structures
19
+ "Split",
20
+ "SplitSystem",
21
+ "WeightedSplitSystem",
22
+ # Distance
23
+ "DistanceMatrix",
24
+ # Sequence
25
+ "MSA",
26
+ # Quartet
27
+ "Quartet",
28
+ "QuartetProfile",
29
+ "QuartetProfileSet",
30
+ ]
31
+
@@ -0,0 +1,20 @@
1
+ """
2
+ Distance module.
3
+
4
+ This module provides classes and functions for working with distance matrices. A
5
+ distance matrix represents pairwise distances between a set of labeled items, where
6
+ distances satisfy properties such as symmetry and non-negativity. The public API
7
+ (DistanceMatrix and the classifications, operations, io submodules) is re-exported
8
+ here; the implementation is split across the base, classifications, operations,
9
+ and io submodules.
10
+ """
11
+
12
+ from .base import DistanceMatrix
13
+ from . import classifications, operations, io
14
+
15
+ __all__ = [
16
+ "DistanceMatrix",
17
+ "classifications",
18
+ "operations",
19
+ "io",
20
+ ]