phylogenie 2.1.13__tar.gz → 3.1.11__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.

Potentially problematic release.


This version of phylogenie might be problematic. Click here for more details.

Files changed (53) hide show
  1. {phylogenie-2.1.13 → phylogenie-3.1.11}/PKG-INFO +15 -21
  2. {phylogenie-2.1.13 → phylogenie-3.1.11}/README.md +4 -5
  3. phylogenie-3.1.11/pyproject.toml +32 -0
  4. phylogenie-3.1.11/setup.cfg +4 -0
  5. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/__init__.py +46 -17
  6. phylogenie-3.1.11/src/phylogenie/draw.py +778 -0
  7. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/generators/alisim.py +9 -7
  8. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/generators/configs.py +26 -4
  9. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/generators/dataset.py +2 -2
  10. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/generators/factories.py +29 -12
  11. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/generators/trees.py +36 -41
  12. phylogenie-3.1.11/src/phylogenie/io/__init__.py +3 -0
  13. phylogenie-3.1.11/src/phylogenie/io/fasta.py +40 -0
  14. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/main.py +27 -10
  15. phylogenie-3.1.11/src/phylogenie/mixins.py +33 -0
  16. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/msa.py +4 -3
  17. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/skyline/matrix.py +11 -7
  18. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/skyline/parameter.py +12 -4
  19. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/skyline/vector.py +12 -6
  20. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/treesimulator/__init__.py +37 -5
  21. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/treesimulator/events/__init__.py +4 -6
  22. phylogenie-3.1.11/src/phylogenie/treesimulator/events/base.py +39 -0
  23. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/treesimulator/events/contact_tracing.py +38 -23
  24. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/treesimulator/events/core.py +14 -5
  25. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/treesimulator/events/mutations.py +40 -48
  26. phylogenie-3.1.11/src/phylogenie/treesimulator/features.py +55 -0
  27. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/treesimulator/gillespie.py +53 -59
  28. phylogenie-3.1.11/src/phylogenie/treesimulator/io/__init__.py +4 -0
  29. phylogenie-3.1.11/src/phylogenie/treesimulator/io/newick.py +104 -0
  30. phylogenie-3.1.11/src/phylogenie/treesimulator/io/nexus.py +50 -0
  31. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/treesimulator/model.py +9 -47
  32. phylogenie-3.1.11/src/phylogenie/treesimulator/tree.py +206 -0
  33. phylogenie-3.1.11/src/phylogenie/treesimulator/utils.py +119 -0
  34. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/typings.py +3 -3
  35. phylogenie-3.1.11/src/phylogenie.egg-info/PKG-INFO +100 -0
  36. phylogenie-3.1.11/src/phylogenie.egg-info/SOURCES.txt +44 -0
  37. phylogenie-3.1.11/src/phylogenie.egg-info/dependency_links.txt +1 -0
  38. phylogenie-3.1.11/src/phylogenie.egg-info/entry_points.txt +2 -0
  39. phylogenie-3.1.11/src/phylogenie.egg-info/requires.txt +6 -0
  40. phylogenie-3.1.11/src/phylogenie.egg-info/top_level.txt +1 -0
  41. phylogenie-2.1.13/phylogenie/io.py +0 -117
  42. phylogenie-2.1.13/phylogenie/models.py +0 -17
  43. phylogenie-2.1.13/phylogenie/plot.py +0 -80
  44. phylogenie-2.1.13/phylogenie/tree.py +0 -107
  45. phylogenie-2.1.13/phylogenie/treesimulator/features.py +0 -39
  46. phylogenie-2.1.13/phylogenie/utils.py +0 -28
  47. phylogenie-2.1.13/pyproject.toml +0 -32
  48. {phylogenie-2.1.13 → phylogenie-3.1.11}/LICENSE.txt +0 -0
  49. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/generators/__init__.py +0 -0
  50. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/generators/typeguards.py +0 -0
  51. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/py.typed +0 -0
  52. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/skyline/__init__.py +0 -0
  53. {phylogenie-2.1.13 → phylogenie-3.1.11/src}/phylogenie/typeguards.py +0 -0
@@ -1,21 +1,17 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: phylogenie
3
- Version: 2.1.13
3
+ Version: 3.1.11
4
4
  Summary: Generate phylogenetic datasets with minimal setup effort
5
- Author: Gabriele Marino
6
- Author-email: gabmarino.8601@gmail.com
7
- Requires-Python: >=3.10,<4.0
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.10
10
- Classifier: Programming Language :: Python :: 3.11
11
- Classifier: Programming Language :: Python :: 3.12
12
- Requires-Dist: joblib (>=1.4.2,<2.0.0)
13
- Requires-Dist: matplotlib (>=3.10.6,<4.0.0)
14
- Requires-Dist: pandas (>=2.2.2,<3.0.0)
15
- Requires-Dist: pydantic (>=2.11.5,<3.0.0)
16
- Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
17
- Requires-Dist: tqdm (>=4.66.4,<5.0.0)
5
+ Requires-Python: >=3.10
18
6
  Description-Content-Type: text/markdown
7
+ License-File: LICENSE.txt
8
+ Requires-Dist: joblib>=1.5.2
9
+ Requires-Dist: matplotlib>=3.10.7
10
+ Requires-Dist: pandas>=2.3.3
11
+ Requires-Dist: pydantic>=2.12.3
12
+ Requires-Dist: pyyaml>=6.0.3
13
+ Requires-Dist: tqdm>=4.67.1
14
+ Dynamic: license-file
19
15
 
20
16
  <p align="center">
21
17
  <img src="https://raw.githubusercontent.com/gabriele-marino/phylogenie/main/logo.png" style="width:100%; height:auto;"/>
@@ -27,7 +23,6 @@ Description-Content-Type: text/markdown
27
23
  [![PyPI version](https://img.shields.io/pypi/v/phylogenie)](https://pypi.org/project/phylogenie/)
28
24
  ![Downloads](https://img.shields.io/pypi/dm/phylogenie)
29
25
 
30
-
31
26
  Phylogenie is a [Python](https://www.python.org/) package designed to easily simulate phylogenetic datasets—such as trees and multiple sequence alignments (MSAs)—with minimal setup effort. Simply specify the distributions from which your parameters should be sampled, and Phylogenie will handle the rest!
32
27
 
33
28
  ## ✨ Features
@@ -77,21 +72,21 @@ Phylogenie relies on [AliSim](https://iqtree.github.io/doc/AliSim) for simulatin
77
72
 
78
73
  ## 🚀 Quick Start
79
74
 
80
- Once you have installed Phylogenie, check out the [examples](https://github.com/gabriele-marino/phylogenie/tree/main/examples) folder.
75
+ Once you have installed Phylogenie, check out the [tutorials](https://github.com/gabriele-marino/phylogenie/tree/main/tutorials) folder.
81
76
  It includes a collection of thoroughly commented configuration files, organized as a step-by-step tutorial. These examples will help you understand how to use Phylogenie in practice and can be easily adapted to fit your own workflow.
82
77
 
83
78
  For quick start, pick your favorite config file and run Phylogenie with:
84
79
  ```bash
85
- phylogenie examples/config_file.yaml
80
+ phylogenie tutorials/config_file.yaml
86
81
  ```
87
82
  This command will create the output dataset in the folder specified inside the configuration file, including data directories and metadata files for each dataset split defined in the config.
88
83
 
89
84
  >❗ *Tip*: Can’t choose just one config file?
90
- You can run them all at once by pointing Phylogenie to the folder! Just use: `phylogenie examples`. In this mode, Phylogenie will automatically find all `.yaml` files in the folder you specified and run for each of them!
85
+ You can run them all at once by pointing Phylogenie to the folder! Just use: `phylogenie tutorials`. In this mode, Phylogenie will automatically find all `.yaml` files in the folder you specified and run for each of them!
91
86
 
92
87
  ## 📖 Documentation
93
88
 
94
- - The [examples](https://github.com/gabriele-marino/phylogenie/tree/main/examples) folder contains many ready-to-use, extensively commented configuration files that serve as a step-by-step tutorial to guide you through using Phylogenie. You can explore them to learn how it works or adapt them directly to your own workflows.
89
+ - The [tutorials](https://github.com/gabriele-marino/phylogenie/tree/main/tutorials) folder contains many ready-to-use, extensively commented configuration files that serve as a step-by-step tutorial to guide you through using Phylogenie. You can explore them to learn how it works or adapt them directly to your own workflows.
95
90
  - A complete user guide and API reference are under development. In the meantime, feel free to [reach out](mailto:gabmarino.8601@email.com) if you have any questions about integrating Phylogenie into your workflows.
96
91
 
97
92
  ## 📄 License
@@ -103,4 +98,3 @@ This project is licensed under [MIT License](https://raw.githubusercontent.com/g
103
98
  For questions, bug reports, or feature requests, please, consider opening an [issue on GitHub](https://github.com/gabriele-marino/phylogenie/issues), or [contact me directly](mailto:gabmarino.8601@email.com).
104
99
 
105
100
  If you need help with the configuration files, feel free to reach out — I am always very available and happy to assist!
106
-
@@ -8,7 +8,6 @@
8
8
  [![PyPI version](https://img.shields.io/pypi/v/phylogenie)](https://pypi.org/project/phylogenie/)
9
9
  ![Downloads](https://img.shields.io/pypi/dm/phylogenie)
10
10
 
11
-
12
11
  Phylogenie is a [Python](https://www.python.org/) package designed to easily simulate phylogenetic datasets—such as trees and multiple sequence alignments (MSAs)—with minimal setup effort. Simply specify the distributions from which your parameters should be sampled, and Phylogenie will handle the rest!
13
12
 
14
13
  ## ✨ Features
@@ -58,21 +57,21 @@ Phylogenie relies on [AliSim](https://iqtree.github.io/doc/AliSim) for simulatin
58
57
 
59
58
  ## 🚀 Quick Start
60
59
 
61
- Once you have installed Phylogenie, check out the [examples](https://github.com/gabriele-marino/phylogenie/tree/main/examples) folder.
60
+ Once you have installed Phylogenie, check out the [tutorials](https://github.com/gabriele-marino/phylogenie/tree/main/tutorials) folder.
62
61
  It includes a collection of thoroughly commented configuration files, organized as a step-by-step tutorial. These examples will help you understand how to use Phylogenie in practice and can be easily adapted to fit your own workflow.
63
62
 
64
63
  For quick start, pick your favorite config file and run Phylogenie with:
65
64
  ```bash
66
- phylogenie examples/config_file.yaml
65
+ phylogenie tutorials/config_file.yaml
67
66
  ```
68
67
  This command will create the output dataset in the folder specified inside the configuration file, including data directories and metadata files for each dataset split defined in the config.
69
68
 
70
69
  >❗ *Tip*: Can’t choose just one config file?
71
- You can run them all at once by pointing Phylogenie to the folder! Just use: `phylogenie examples`. In this mode, Phylogenie will automatically find all `.yaml` files in the folder you specified and run for each of them!
70
+ You can run them all at once by pointing Phylogenie to the folder! Just use: `phylogenie tutorials`. In this mode, Phylogenie will automatically find all `.yaml` files in the folder you specified and run for each of them!
72
71
 
73
72
  ## 📖 Documentation
74
73
 
75
- - The [examples](https://github.com/gabriele-marino/phylogenie/tree/main/examples) folder contains many ready-to-use, extensively commented configuration files that serve as a step-by-step tutorial to guide you through using Phylogenie. You can explore them to learn how it works or adapt them directly to your own workflows.
74
+ - The [tutorials](https://github.com/gabriele-marino/phylogenie/tree/main/tutorials) folder contains many ready-to-use, extensively commented configuration files that serve as a step-by-step tutorial to guide you through using Phylogenie. You can explore them to learn how it works or adapt them directly to your own workflows.
76
75
  - A complete user guide and API reference are under development. In the meantime, feel free to [reach out](mailto:gabmarino.8601@email.com) if you have any questions about integrating Phylogenie into your workflows.
77
76
 
78
77
  ## 📄 License
@@ -0,0 +1,32 @@
1
+ [project]
2
+ name = "phylogenie"
3
+ version = "3.1.11"
4
+ description = "Generate phylogenetic datasets with minimal setup effort"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ dependencies = [
8
+ "joblib>=1.5.2",
9
+ "matplotlib>=3.10.7",
10
+ "pandas>=2.3.3",
11
+ "pydantic>=2.12.3",
12
+ "pyyaml>=6.0.3",
13
+ "tqdm>=4.67.1",
14
+ ]
15
+
16
+ [dependency-groups]
17
+ dev = [
18
+ "joblib-stubs>=1.5.2.0.20250831",
19
+ "pandas-stubs>=2.3.2.250926",
20
+ "pyright>=1.1.407",
21
+ "pytest>=8.4.2",
22
+ ]
23
+
24
+ [tool.pyright]
25
+ typeCheckingMode = "strict"
26
+
27
+ [project.scripts]
28
+ phylogenie = "phylogenie.main:main"
29
+
30
+ [build-system]
31
+ requires = ["setuptools>=42"]
32
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -10,9 +10,8 @@ from phylogenie.generators import (
10
10
  FBDTreeDatasetGenerator,
11
11
  TreeDatasetGeneratorConfig,
12
12
  )
13
- from phylogenie.io import dump_newick, load_fasta, load_newick
14
- from phylogenie.msa import MSA
15
- from phylogenie.plot import Coloring, plot_tree
13
+ from phylogenie.io import dump_fasta, load_fasta
14
+ from phylogenie.msa import MSA, Sequence
16
15
  from phylogenie.skyline import (
17
16
  SkylineMatrix,
18
17
  SkylineMatrixCoercible,
@@ -25,25 +24,41 @@ from phylogenie.skyline import (
25
24
  skyline_parameter,
26
25
  skyline_vector,
27
26
  )
28
- from phylogenie.tree import Tree
29
27
  from phylogenie.treesimulator import (
30
28
  Birth,
31
29
  BirthWithContactTracing,
32
30
  Death,
33
31
  Event,
32
+ EventType,
33
+ Feature,
34
34
  Migration,
35
35
  Mutation,
36
- MutationTargetType,
37
36
  Sampling,
38
37
  SamplingWithContactTracing,
38
+ Tree,
39
+ compute_mean_leaf_pairwise_distance,
40
+ compute_sackin_index,
41
+ dump_newick,
39
42
  generate_trees,
40
43
  get_BD_events,
41
44
  get_BDEI_events,
42
45
  get_BDSS_events,
43
46
  get_canonical_events,
44
47
  get_contact_tracing_events,
48
+ get_distance,
45
49
  get_epidemiological_events,
46
50
  get_FBD_events,
51
+ get_mrca,
52
+ get_mutation_id,
53
+ get_node_depth_levels,
54
+ get_node_depths,
55
+ get_node_height_levels,
56
+ get_node_heights,
57
+ get_node_leaf_counts,
58
+ get_node_state,
59
+ load_newick,
60
+ load_nexus,
61
+ set_features,
47
62
  simulate_tree,
48
63
  )
49
64
 
@@ -57,40 +72,54 @@ __all__ = [
57
72
  "DatasetGeneratorConfig",
58
73
  "EpidemiologicalTreeDatasetGenerator",
59
74
  "FBDTreeDatasetGenerator",
75
+ "TreeDatasetGeneratorConfig",
76
+ "dump_fasta",
77
+ "load_fasta",
78
+ "MSA",
79
+ "Sequence",
60
80
  "SkylineMatrix",
61
81
  "SkylineMatrixCoercible",
62
- "skyline_matrix",
63
82
  "SkylineParameter",
64
83
  "SkylineParameterLike",
65
- "skyline_parameter",
66
84
  "SkylineVector",
67
85
  "SkylineVectorCoercible",
68
86
  "SkylineVectorLike",
87
+ "skyline_matrix",
88
+ "skyline_parameter",
69
89
  "skyline_vector",
70
- "Tree",
71
- "TreeDatasetGeneratorConfig",
72
90
  "Birth",
73
91
  "BirthWithContactTracing",
74
92
  "Death",
75
93
  "Event",
94
+ "EventType",
95
+ "Feature",
76
96
  "Migration",
77
97
  "Mutation",
78
- "MutationTargetType",
79
98
  "Sampling",
80
99
  "SamplingWithContactTracing",
100
+ "Tree",
101
+ "compute_mean_leaf_pairwise_distance",
102
+ "compute_sackin_index",
103
+ "dump_newick",
104
+ "generate_trees",
81
105
  "get_BD_events",
82
106
  "get_BDEI_events",
83
107
  "get_BDSS_events",
84
108
  "get_canonical_events",
85
109
  "get_contact_tracing_events",
110
+ "get_distance",
86
111
  "get_epidemiological_events",
87
112
  "get_FBD_events",
88
- "generate_trees",
89
- "simulate_tree",
90
- "dump_newick",
91
- "load_fasta",
113
+ "get_mrca",
114
+ "get_mutation_id",
115
+ "get_node_depth_levels",
116
+ "get_node_depths",
117
+ "get_node_height_levels",
118
+ "get_node_heights",
119
+ "get_node_leaf_counts",
120
+ "get_node_state",
92
121
  "load_newick",
93
- "MSA",
94
- "Coloring",
95
- "plot_tree",
122
+ "load_nexus",
123
+ "set_features",
124
+ "simulate_tree",
96
125
  ]