phylogenie 2.0.1__tar.gz → 2.0.3__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 (29) hide show
  1. {phylogenie-2.0.1 → phylogenie-2.0.3}/PKG-INFO +3 -6
  2. {phylogenie-2.0.1 → phylogenie-2.0.3}/README.md +2 -5
  3. phylogenie-2.0.3/phylogenie/__init__.py +72 -0
  4. phylogenie-2.0.3/phylogenie/generators/__init__.py +32 -0
  5. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/generators/configs.py +3 -1
  6. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/generators/factories.py +4 -1
  7. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/generators/trees.py +6 -6
  8. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/io.py +1 -1
  9. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/skyline/matrix.py +7 -3
  10. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/treesimulator/events.py +47 -48
  11. {phylogenie-2.0.1 → phylogenie-2.0.3}/pyproject.toml +1 -1
  12. phylogenie-2.0.1/phylogenie/__init__.py +0 -0
  13. phylogenie-2.0.1/phylogenie/generators/__init__.py +0 -14
  14. {phylogenie-2.0.1 → phylogenie-2.0.3}/LICENSE.txt +0 -0
  15. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/generators/alisim.py +0 -0
  16. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/generators/dataset.py +0 -0
  17. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/generators/typeguards.py +0 -0
  18. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/main.py +0 -0
  19. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/msa.py +0 -0
  20. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/py.typed +0 -0
  21. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/skyline/__init__.py +0 -0
  22. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/skyline/parameter.py +0 -0
  23. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/skyline/vector.py +0 -0
  24. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/tree.py +0 -0
  25. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/treesimulator/__init__.py +0 -0
  26. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/treesimulator/gillespie.py +0 -0
  27. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/treesimulator/model.py +0 -0
  28. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/typeguards.py +0 -0
  29. {phylogenie-2.0.1 → phylogenie-2.0.3}/phylogenie/typings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: phylogenie
3
- Version: 2.0.1
3
+ Version: 2.0.3
4
4
  Summary: Generate phylogenetic datasets with minimal setup effort
5
5
  Author: Gabriele Marino
6
6
  Author-email: gabmarino.8601@gmail.com
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
23
23
  ---
24
24
 
25
25
  [![AliSim](https://img.shields.io/badge/Powered%20by-AliSim-orange?style=flat-square)](https://iqtree.github.io/doc/AliSim)
26
- [![PyPI package](https://badge.fury.io/py/phylogenie.svg)](https://pypi.org/project/phylogenie/)
26
+ [![PyPI version](https://img.shields.io/pypi/v/phylogenie)](https://pypi.org/project/phylogenie/)
27
27
  [![PyPI downloads](https://shields.io/pypi/dm/phylogenie)](https://pypi.org/project/phylogenie/)
28
28
 
29
29
  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!
@@ -53,9 +53,6 @@ Phylogenie comes packed with useful features, including:
53
53
  - **Arithmetic operations on parameters** 🧮
54
54
  Perform flexible arithmetic operations between parameters directly within the config file.
55
55
 
56
- - **Modular and extendible architecture** 🧩
57
- Easily add new simulation backends as needed.
58
-
59
56
  ## 📦 Installation
60
57
  Phylogenie requires [Python](https://www.python.org/) 3.10 to be installed on your system. There are several ways to install Python and managing different Python versions. One popular option is to use [pyenv](https://github.com/pyenv/pyenv).
61
58
 
@@ -83,7 +80,7 @@ It includes a collection of thoroughly commented configuration files, organized
83
80
 
84
81
  For quick start, pick your favorite config file and run Phylogenie with:
85
82
  ```bash
86
- phylogenie examples/<config_file>.yaml
83
+ phylogenie examples/config_file.yaml
87
84
  ```
88
85
  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.
89
86
 
@@ -5,7 +5,7 @@
5
5
  ---
6
6
 
7
7
  [![AliSim](https://img.shields.io/badge/Powered%20by-AliSim-orange?style=flat-square)](https://iqtree.github.io/doc/AliSim)
8
- [![PyPI package](https://badge.fury.io/py/phylogenie.svg)](https://pypi.org/project/phylogenie/)
8
+ [![PyPI version](https://img.shields.io/pypi/v/phylogenie)](https://pypi.org/project/phylogenie/)
9
9
  [![PyPI downloads](https://shields.io/pypi/dm/phylogenie)](https://pypi.org/project/phylogenie/)
10
10
 
11
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!
@@ -35,9 +35,6 @@ Phylogenie comes packed with useful features, including:
35
35
  - **Arithmetic operations on parameters** 🧮
36
36
  Perform flexible arithmetic operations between parameters directly within the config file.
37
37
 
38
- - **Modular and extendible architecture** 🧩
39
- Easily add new simulation backends as needed.
40
-
41
38
  ## 📦 Installation
42
39
  Phylogenie requires [Python](https://www.python.org/) 3.10 to be installed on your system. There are several ways to install Python and managing different Python versions. One popular option is to use [pyenv](https://github.com/pyenv/pyenv).
43
40
 
@@ -65,7 +62,7 @@ It includes a collection of thoroughly commented configuration files, organized
65
62
 
66
63
  For quick start, pick your favorite config file and run Phylogenie with:
67
64
  ```bash
68
- phylogenie examples/<config_file>.yaml
65
+ phylogenie examples/config_file.yaml
69
66
  ```
70
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.
71
68
 
@@ -0,0 +1,72 @@
1
+ from phylogenie.generators import (
2
+ AliSimDatasetGenerator,
3
+ BDEITreeDatasetGenerator,
4
+ BDSSTreeDatasetGenerator,
5
+ BDTreeDatasetGenerator,
6
+ CanonicalTreeDatasetGenerator,
7
+ DatasetGenerator,
8
+ DatasetGeneratorConfig,
9
+ EpidemiologicalTreeDatasetGenerator,
10
+ FBDTreeDatasetGenerator,
11
+ TreeDatasetGeneratorConfig,
12
+ )
13
+ from phylogenie.io import load_fasta, load_newick
14
+ from phylogenie.msa import MSA
15
+ from phylogenie.skyline import (
16
+ SkylineMatrix,
17
+ SkylineMatrixCoercible,
18
+ SkylineParameter,
19
+ SkylineParameterLike,
20
+ SkylineVector,
21
+ SkylineVectorCoercible,
22
+ SkylineVectorLike,
23
+ skyline_matrix,
24
+ skyline_parameter,
25
+ skyline_vector,
26
+ )
27
+ from phylogenie.tree import Tree
28
+ from phylogenie.treesimulator import (
29
+ Event,
30
+ get_BD_events,
31
+ get_BDEI_events,
32
+ get_BDSS_events,
33
+ get_canonical_events,
34
+ get_epidemiological_events,
35
+ get_FBD_events,
36
+ simulate_tree,
37
+ )
38
+
39
+ __all__ = [
40
+ "AliSimDatasetGenerator",
41
+ "BDEITreeDatasetGenerator",
42
+ "BDSSTreeDatasetGenerator",
43
+ "BDTreeDatasetGenerator",
44
+ "CanonicalTreeDatasetGenerator",
45
+ "DatasetGenerator",
46
+ "DatasetGeneratorConfig",
47
+ "EpidemiologicalTreeDatasetGenerator",
48
+ "FBDTreeDatasetGenerator",
49
+ "SkylineMatrix",
50
+ "SkylineMatrixCoercible",
51
+ "skyline_matrix",
52
+ "SkylineParameter",
53
+ "SkylineParameterLike",
54
+ "skyline_parameter",
55
+ "SkylineVector",
56
+ "SkylineVectorCoercible",
57
+ "SkylineVectorLike",
58
+ "skyline_vector",
59
+ "Tree",
60
+ "TreeDatasetGeneratorConfig",
61
+ "Event",
62
+ "get_BD_events",
63
+ "get_BDEI_events",
64
+ "get_BDSS_events",
65
+ "get_canonical_events",
66
+ "get_epidemiological_events",
67
+ "get_FBD_events",
68
+ "simulate_tree",
69
+ "load_fasta",
70
+ "load_newick",
71
+ "MSA",
72
+ ]
@@ -0,0 +1,32 @@
1
+ from typing import Annotated
2
+
3
+ from pydantic import Field
4
+
5
+ from phylogenie.generators.alisim import AliSimDatasetGenerator
6
+ from phylogenie.generators.dataset import DatasetGenerator
7
+ from phylogenie.generators.trees import (
8
+ BDEITreeDatasetGenerator,
9
+ BDSSTreeDatasetGenerator,
10
+ BDTreeDatasetGenerator,
11
+ CanonicalTreeDatasetGenerator,
12
+ EpidemiologicalTreeDatasetGenerator,
13
+ FBDTreeDatasetGenerator,
14
+ TreeDatasetGeneratorConfig,
15
+ )
16
+
17
+ DatasetGeneratorConfig = Annotated[
18
+ TreeDatasetGeneratorConfig | AliSimDatasetGenerator,
19
+ Field(discriminator="data_type"),
20
+ ]
21
+
22
+ __all__ = [
23
+ "DatasetGeneratorConfig",
24
+ "DatasetGenerator",
25
+ "AliSimDatasetGenerator",
26
+ "CanonicalTreeDatasetGenerator",
27
+ "EpidemiologicalTreeDatasetGenerator",
28
+ "FBDTreeDatasetGenerator",
29
+ "BDTreeDatasetGenerator",
30
+ "BDEITreeDatasetGenerator",
31
+ "BDSSTreeDatasetGenerator",
32
+ ]
@@ -38,4 +38,6 @@ SkylineParameterConfig = ScalarConfig | SkylineParameterModel
38
38
  SkylineVectorConfig = (
39
39
  str | pgt.Scalar | list[SkylineParameterConfig] | SkylineVectorModel
40
40
  )
41
- SkylineMatrixConfig = str | pgt.Scalar | list[SkylineVectorConfig] | SkylineMatrixModel
41
+ SkylineMatrixConfig = (
42
+ str | pgt.Scalar | list[SkylineVectorConfig] | SkylineMatrixModel | None
43
+ )
@@ -148,7 +148,10 @@ def one_or_many_2D_scalars(
148
148
 
149
149
  def skyline_matrix(
150
150
  x: cfg.SkylineMatrixConfig, data: dict[str, Any]
151
- ) -> SkylineMatrixCoercible:
151
+ ) -> SkylineMatrixCoercible | None:
152
+ if x is None:
153
+ return None
154
+
152
155
  if isinstance(x, str):
153
156
  e = _eval_expression(x, data)
154
157
  if tg.is_one_or_many_2D_scalars(e):
@@ -89,8 +89,8 @@ class CanonicalTreeDatasetGenerator(TreeDatasetGenerator):
89
89
  birth_rates: cfg.SkylineVectorConfig = 0
90
90
  death_rates: cfg.SkylineVectorConfig = 0
91
91
  removal_probabilities: cfg.SkylineVectorConfig = 0
92
- migration_rates: cfg.SkylineMatrixConfig = 0
93
- birth_rates_among_states: cfg.SkylineMatrixConfig = 0
92
+ migration_rates: cfg.SkylineMatrixConfig = None
93
+ birth_rates_among_states: cfg.SkylineMatrixConfig = None
94
94
  states: list[str] | None = None
95
95
 
96
96
  def _get_events(self, rng: Generator, data: dict[str, Any]) -> list[Event]:
@@ -116,8 +116,8 @@ class EpidemiologicalTreeDatasetGenerator(TreeDatasetGenerator):
116
116
  become_uninfectious_rates: cfg.SkylineVectorConfig = 0
117
117
  sampling_proportions: cfg.SkylineVectorConfig = 1
118
118
  removal_probabilities: cfg.SkylineVectorConfig = 1
119
- migration_rates: cfg.SkylineMatrixConfig = 0
120
- reproduction_numbers_among_states: cfg.SkylineMatrixConfig = 0
119
+ migration_rates: cfg.SkylineMatrixConfig = None
120
+ reproduction_numbers_among_states: cfg.SkylineMatrixConfig = None
121
121
 
122
122
  def _get_events(self, rng: Generator, data: dict[str, Any]) -> list[Event]:
123
123
  return get_epidemiological_events(
@@ -142,8 +142,8 @@ class FBDTreeDatasetGenerator(TreeDatasetGenerator):
142
142
  turnover: cfg.SkylineVectorConfig = 0
143
143
  sampling_proportions: cfg.SkylineVectorConfig = 1
144
144
  removal_probabilities: cfg.SkylineVectorConfig = 0
145
- migration_rates: cfg.SkylineMatrixConfig = 0
146
- diversification_between_types: cfg.SkylineMatrixConfig = 0
145
+ migration_rates: cfg.SkylineMatrixConfig = None
146
+ diversification_between_types: cfg.SkylineMatrixConfig = None
147
147
 
148
148
  def _get_events(self, rng: Generator, data: dict[str, Any]) -> list[Event]:
149
149
  return get_FBD_events(
@@ -85,7 +85,7 @@ def load_fasta(
85
85
  else:
86
86
  try:
87
87
  time = float(id.split("|")[-1])
88
- except ValueError:
88
+ except:
89
89
  time = None
90
90
  chars = next(f).strip()
91
91
  sequences.append(Sequence(id, chars, time))
@@ -159,9 +159,13 @@ class SkylineMatrix:
159
159
  @overload
160
160
  def __getitem__(self, item: slice) -> "SkylineMatrix": ...
161
161
  @overload
162
- def __getitem__(
163
- self, item: tuple[int | slice, int | slice]
164
- ) -> Union[SkylineParameter, SkylineVector, "SkylineMatrix"]: ...
162
+ def __getitem__(self, item: tuple[int, int]) -> SkylineParameter: ...
163
+ @overload
164
+ def __getitem__(self, item: tuple[int, slice]) -> SkylineVector: ...
165
+ @overload
166
+ def __getitem__(self, item: tuple[slice, int]) -> SkylineVector: ...
167
+ @overload
168
+ def __getitem__(self, item: tuple[slice, slice]) -> "SkylineMatrix": ...
165
169
  def __getitem__(
166
170
  self, item: int | slice | tuple[int | slice, int | slice]
167
171
  ) -> Union[SkylineParameter | SkylineVector, "SkylineMatrix"]:
@@ -55,7 +55,7 @@ class DeathEvent(Event):
55
55
 
56
56
 
57
57
  class MigrationEvent(Event):
58
- def __init__(self, state: str, target_state: str, rate: SkylineParameterLike):
58
+ def __init__(self, rate: SkylineParameterLike, state: str, target_state: str):
59
59
  super().__init__(rate, state)
60
60
  self.target_state = target_state
61
61
 
@@ -68,8 +68,8 @@ class SamplingEvent(Event):
68
68
  def __init__(
69
69
  self,
70
70
  rate: SkylineParameterLike,
71
- removal_probability: SkylineParameterLike,
72
71
  state: str | None = None,
72
+ removal_probability: SkylineParameterLike = 0,
73
73
  ):
74
74
  super().__init__(rate, state)
75
75
  self.removal_probability = skyline_parameter(removal_probability)
@@ -85,8 +85,8 @@ def get_canonical_events(
85
85
  birth_rates: SkylineVectorCoercible = 0,
86
86
  death_rates: SkylineVectorCoercible = 0,
87
87
  removal_probabilities: SkylineVectorCoercible = 0,
88
- migration_rates: SkylineMatrixCoercible = 0,
89
- birth_rates_among_states: SkylineMatrixCoercible = 0,
88
+ migration_rates: SkylineMatrixCoercible | None = None,
89
+ birth_rates_among_states: SkylineMatrixCoercible | None = None,
90
90
  states: list[str] | None = None,
91
91
  ) -> list[Event]:
92
92
  N = 1 if states is None else len(states)
@@ -95,31 +95,32 @@ def get_canonical_events(
95
95
  death_rates = skyline_vector(death_rates, N)
96
96
  sampling_rates = skyline_vector(sampling_rates, N)
97
97
  removal_probabilities = skyline_vector(removal_probabilities, N)
98
- if migration_rates and N == 1:
99
- raise ValueError(f"Migration rates require multiple states (got {states}).")
100
- if birth_rates_among_states and N == 1:
101
- raise ValueError(
102
- f"Birth rates among states require multiple states (got {states})."
103
- )
104
98
 
105
99
  events: list[Event] = []
106
100
  for i in range(N):
107
101
  state = None if states is None else states[i]
108
102
  events.append(BirthEvent(birth_rates[i], state, state))
109
103
  events.append(DeathEvent(death_rates[i], state))
110
- events.append(SamplingEvent(sampling_rates[i], removal_probabilities[i], state))
111
- if N > 1:
112
- migration_rates = skyline_matrix(migration_rates, N, N - 1)
113
- birth_rates_among_states = skyline_matrix(
114
- birth_rates_among_states, N, N - 1
115
- )
116
- assert states is not None
117
- assert state is not None
104
+ events.append(SamplingEvent(sampling_rates[i], state, removal_probabilities[i]))
105
+
106
+ if states is not None and migration_rates is not None:
107
+ migration_rates = skyline_matrix(migration_rates, N, N - 1)
108
+ for i, state in enumerate(states):
109
+ for j, other_state in enumerate([s for s in states if s != state]):
110
+ events.append(MigrationEvent(migration_rates[i, j], state, other_state))
111
+ elif migration_rates is not None:
112
+ raise ValueError(f"Migration rates require states to be provided.")
113
+
114
+ if states is not None and birth_rates_among_states is not None:
115
+ birth_rates_among_states = skyline_matrix(birth_rates_among_states, N, N - 1)
116
+ for i, state in enumerate(states):
118
117
  for j, other_state in enumerate([s for s in states if s != state]):
119
- events.append(MigrationEvent(state, other_state, migration_rates[i][j]))
120
118
  events.append(
121
- BirthEvent(birth_rates_among_states[i][j], state, other_state)
119
+ BirthEvent(birth_rates_among_states[i, j], state, other_state)
122
120
  )
121
+ elif birth_rates_among_states is not None:
122
+ raise ValueError(f"Birth rates among states require states to be provided.")
123
+
123
124
  return [event for event in events if event.rate]
124
125
 
125
126
 
@@ -128,8 +129,8 @@ def get_epidemiological_events(
128
129
  reproduction_numbers: SkylineVectorCoercible = 0,
129
130
  become_uninfectious_rates: SkylineVectorCoercible = 0,
130
131
  removal_probabilities: SkylineVectorCoercible = 1,
131
- migration_rates: SkylineMatrixCoercible = 0,
132
- reproduction_numbers_among_states: SkylineMatrixCoercible = 0,
132
+ migration_rates: SkylineMatrixCoercible | None = None,
133
+ reproduction_numbers_among_states: SkylineMatrixCoercible | None = None,
133
134
  states: list[str] | None = None,
134
135
  ) -> list[Event]:
135
136
  N = 1 if states is None else len(states)
@@ -138,20 +139,20 @@ def get_epidemiological_events(
138
139
  become_uninfectious_rates = skyline_vector(become_uninfectious_rates, N)
139
140
  sampling_proportions = skyline_vector(sampling_proportions, N)
140
141
  removal_probabilities = skyline_vector(removal_probabilities, N)
141
- if N == 1 and reproduction_numbers_among_states:
142
- raise ValueError(
143
- f"Reproduction numbers among states require multiple states (got {states})."
144
- )
145
- reproduction_numbers_among_states = (
146
- skyline_matrix(reproduction_numbers_among_states, N, N - 1) if N > 1 else 0
147
- )
148
142
 
149
143
  birth_rates = reproduction_numbers * become_uninfectious_rates
150
144
  sampling_rates = become_uninfectious_rates * sampling_proportions
151
- birth_rates_among_states = (
152
- reproduction_numbers_among_states * become_uninfectious_rates
153
- )
154
145
  death_rates = become_uninfectious_rates - removal_probabilities * sampling_rates
146
+ birth_rates_among_states = None
147
+ if states is None and reproduction_numbers_among_states is not None:
148
+ raise ValueError(
149
+ f"Reproduction numbers among states require states to be provided."
150
+ )
151
+ elif reproduction_numbers_among_states is not None:
152
+ birth_rates_among_states = (
153
+ skyline_matrix(reproduction_numbers_among_states, N, N - 1)
154
+ * become_uninfectious_rates
155
+ )
155
156
 
156
157
  return get_canonical_events(
157
158
  states=states,
@@ -169,32 +170,30 @@ def get_FBD_events(
169
170
  turnover: SkylineVectorCoercible = 0,
170
171
  sampling_proportions: SkylineVectorCoercible = 1,
171
172
  removal_probabilities: SkylineVectorCoercible = 0,
172
- migration_rates: SkylineMatrixCoercible = 0,
173
- diversification_between_types: SkylineMatrixCoercible = 0,
173
+ migration_rates: SkylineMatrixCoercible | None = None,
174
+ diversification_between_types: SkylineMatrixCoercible | None = None,
174
175
  states: list[str] | None = None,
175
- ):
176
+ ) -> list[Event]:
176
177
  N = 1 if states is None else len(states)
177
178
 
178
179
  diversification = skyline_vector(diversification, N)
179
180
  turnover = skyline_vector(turnover, N)
180
181
  sampling_proportions = skyline_vector(sampling_proportions, N)
181
182
  removal_probabilities = skyline_vector(removal_probabilities, N)
182
- if N == 1 and diversification_between_types:
183
- raise ValueError(
184
- f"Diversification rates among states require multiple states (got {states})."
185
- )
186
- diversification_between_types = (
187
- skyline_matrix(diversification_between_types, N, N - 1) if N > 1 else 0
188
- )
189
183
 
190
184
  birth_rates = diversification / (1 - turnover)
191
185
  death_rates = turnover * birth_rates
192
- sampling_rates = (
193
- sampling_proportions
194
- * death_rates
195
- / (1 - removal_probabilities * sampling_proportions)
196
- )
197
- birth_rates_among_states = diversification_between_types + death_rates
186
+ sampling_rates_dividend = 1 - removal_probabilities * sampling_proportions
187
+ sampling_rates = sampling_proportions * death_rates / sampling_rates_dividend
188
+ birth_rates_among_states = None
189
+ if states is None and diversification_between_types is not None:
190
+ raise ValueError(
191
+ f"Diversification rates among states require states to be provided."
192
+ )
193
+ elif diversification_between_types is not None:
194
+ birth_rates_among_states = (
195
+ skyline_matrix(diversification_between_types, N, N - 1) + death_rates
196
+ )
198
197
 
199
198
  return get_canonical_events(
200
199
  states=states,
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "phylogenie"
3
- version = "2.0.1"
3
+ version = "2.0.3"
4
4
  description = "Generate phylogenetic datasets with minimal setup effort"
5
5
  authors = ["Gabriele Marino <gabmarino.8601@gmail.com>"]
6
6
  readme = "README.md"
File without changes
@@ -1,14 +0,0 @@
1
- from typing import Annotated
2
-
3
- from pydantic import Field
4
-
5
- from phylogenie.generators.alisim import AliSimDatasetGenerator
6
- from phylogenie.generators.dataset import DatasetGenerator
7
- from phylogenie.generators.trees import TreeDatasetGeneratorConfig
8
-
9
- DatasetGeneratorConfig = Annotated[
10
- TreeDatasetGeneratorConfig | AliSimDatasetGenerator,
11
- Field(discriminator="data_type"),
12
- ]
13
-
14
- __all__ = ["DatasetGeneratorConfig", "DatasetGenerator"]
File without changes
File without changes