phylogenie 1.0.0__py3-none-any.whl → 1.0.2__py3-none-any.whl
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.
- phylogenie/backend/remaster/generate.py +5 -5
- phylogenie/backend/remaster/reactions.py +23 -23
- phylogenie/backend/treesimulator.py +6 -6
- phylogenie/core/configs.py +17 -12
- phylogenie/core/context/factories.py +5 -8
- phylogenie/core/dataset.py +6 -6
- phylogenie/core/factories.py +146 -69
- phylogenie/core/msas/alisim.py +2 -2
- phylogenie/core/msas/base.py +3 -3
- phylogenie/core/trees/remaster/configs.py +3 -3
- phylogenie/core/trees/remaster/factories.py +8 -12
- phylogenie/core/trees/remaster/generator.py +57 -47
- phylogenie/core/trees/treesimulator.py +18 -16
- phylogenie/core/typeguards.py +12 -20
- phylogenie/skyline/__init__.py +14 -4
- phylogenie/skyline/matrix.py +45 -55
- phylogenie/skyline/parameter.py +29 -20
- phylogenie/skyline/vector.py +42 -51
- phylogenie/typeguards.py +10 -8
- phylogenie/typings.py +8 -7
- phylogenie-1.0.2.dist-info/LICENSE.txt +22 -0
- phylogenie-1.0.2.dist-info/METADATA +120 -0
- phylogenie-1.0.2.dist-info/RECORD +39 -0
- phylogenie/core/typings.py +0 -10
- phylogenie/utils.py +0 -20
- phylogenie-1.0.0.dist-info/METADATA +0 -31
- phylogenie-1.0.0.dist-info/RECORD +0 -40
- {phylogenie-1.0.0.dist-info → phylogenie-1.0.2.dist-info}/WHEEL +0 -0
- {phylogenie-1.0.0.dist-info → phylogenie-1.0.2.dist-info}/entry_points.txt +0 -0
phylogenie/skyline/vector.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from collections.abc import Callable, Iterator
|
|
2
|
-
from typing import TypeGuard, Union
|
|
2
|
+
from typing import TypeGuard, Union
|
|
3
3
|
|
|
4
4
|
import phylogenie.typeguards as tg
|
|
5
5
|
import phylogenie.typings as pgt
|
|
@@ -11,38 +11,51 @@ from phylogenie.skyline.parameter import (
|
|
|
11
11
|
skyline_parameter,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
-
SkylineVectorParams = pgt.OneOrMany[SkylineParameterLike]
|
|
15
14
|
SkylineVectorOperand = Union[SkylineParameterLike, "SkylineVector"]
|
|
16
|
-
SkylineVectorLike = Union[
|
|
15
|
+
SkylineVectorLike = Union[pgt.Many[SkylineParameterLike], "SkylineVector"]
|
|
16
|
+
SkylineVectorCoercible = Union[pgt.OneOrMany[SkylineParameterLike], "SkylineVector"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def is_skyline_vector_operand(x: object) -> TypeGuard[SkylineVectorOperand]:
|
|
20
|
+
return isinstance(x, SkylineVector) or is_skyline_parameter_like(x)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def is_skyline_vector_like(x: object) -> TypeGuard[SkylineVectorLike]:
|
|
24
|
+
return isinstance(x, SkylineVector) or is_many_skyline_parameters_like(x)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def is_many_skyline_vectors_like(x: object) -> TypeGuard[pgt.Many[SkylineVectorLike]]:
|
|
28
|
+
return tg.is_many(x) and all(is_skyline_vector_like(v) for v in x)
|
|
17
29
|
|
|
18
30
|
|
|
19
31
|
class SkylineVector:
|
|
20
32
|
def __init__(
|
|
21
33
|
self,
|
|
22
|
-
params:
|
|
23
|
-
value: pgt.
|
|
24
|
-
change_times: pgt.
|
|
34
|
+
params: pgt.Many[SkylineParameterLike] | None = None,
|
|
35
|
+
value: pgt.Many2DScalars | None = None,
|
|
36
|
+
change_times: pgt.ManyScalars | None = None,
|
|
25
37
|
) -> None:
|
|
26
38
|
if params is not None and value is None and change_times is None:
|
|
27
|
-
if
|
|
28
|
-
self.params = [skyline_parameter(params)]
|
|
29
|
-
elif is_many_skyline_parameters_like(params):
|
|
39
|
+
if is_many_skyline_parameters_like(params):
|
|
30
40
|
self.params = [skyline_parameter(param) for param in params]
|
|
31
41
|
else:
|
|
32
42
|
raise TypeError(
|
|
33
|
-
f"It is impossible to create a SkylineVector from `params` {params} of type {type(params)}. Please provide a SkylineParameterLike
|
|
43
|
+
f"It is impossible to create a SkylineVector from `params` {params} of type {type(params)}. Please provide a sequence of SkylineParameterLike objects (a SkylineParameterLike object can either be a SkylineParameter or a scalar)."
|
|
34
44
|
)
|
|
35
45
|
elif value is not None and change_times is not None:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
46
|
+
if tg.is_many_2D_scalars(value):
|
|
47
|
+
vector_lengths = {len(vector) for vector in value}
|
|
48
|
+
if any(vl != len(value[0]) for vl in vector_lengths):
|
|
49
|
+
raise ValueError(
|
|
50
|
+
f"All rows in the `value` of a SkylineVector must have the same length (got value={value} with vector lengths={vector_lengths})."
|
|
51
|
+
)
|
|
52
|
+
else:
|
|
53
|
+
raise TypeError(
|
|
54
|
+
f"It is impossible to create a SkylineVector from `value` {value} of type {type(value)}. Please provide a nested (2D) sequence of scalar values."
|
|
40
55
|
)
|
|
41
|
-
N = Ns.pop() if Ns else 1
|
|
42
|
-
value = [[x] * N if isinstance(x, pgt.Scalar) else x for x in value]
|
|
43
56
|
self.params = [
|
|
44
|
-
SkylineParameter([
|
|
45
|
-
for i in range(
|
|
57
|
+
SkylineParameter([vector[i] for vector in value], change_times)
|
|
58
|
+
for i in range(len(value[0]))
|
|
46
59
|
]
|
|
47
60
|
else:
|
|
48
61
|
raise ValueError(
|
|
@@ -51,20 +64,18 @@ class SkylineVector:
|
|
|
51
64
|
|
|
52
65
|
@property
|
|
53
66
|
def change_times(self) -> pgt.Vector1D:
|
|
54
|
-
return
|
|
55
|
-
sorted(set(t for param in self.params for t in param.change_times))
|
|
56
|
-
)
|
|
67
|
+
return sorted(set(t for param in self.params for t in param.change_times))
|
|
57
68
|
|
|
58
69
|
@property
|
|
59
70
|
def value(self) -> pgt.Vector2D:
|
|
60
|
-
return
|
|
71
|
+
return [self.get_value_at_time(t) for t in (0, *self.change_times)]
|
|
61
72
|
|
|
62
73
|
@property
|
|
63
74
|
def N(self) -> int:
|
|
64
75
|
return len(self.params)
|
|
65
76
|
|
|
66
77
|
def get_value_at_time(self, t: pgt.Scalar) -> pgt.Vector1D:
|
|
67
|
-
return
|
|
78
|
+
return [param.get_value_at_time(t) for param in self.params]
|
|
68
79
|
|
|
69
80
|
def operate(
|
|
70
81
|
self,
|
|
@@ -117,48 +128,28 @@ class SkylineVector:
|
|
|
117
128
|
def __iter__(self) -> Iterator[SkylineParameter]:
|
|
118
129
|
return iter(self.params)
|
|
119
130
|
|
|
120
|
-
|
|
121
|
-
def __getitem__(self, item: int) -> SkylineParameter: ...
|
|
122
|
-
@overload
|
|
123
|
-
def __getitem__(self, item: slice) -> "SkylineVector": ...
|
|
124
|
-
def __getitem__(self, item: int | slice) -> "SkylineParameter | SkylineVector":
|
|
125
|
-
if isinstance(item, slice):
|
|
126
|
-
return SkylineVector(self.params[item])
|
|
131
|
+
def __getitem__(self, item: int) -> "SkylineParameter":
|
|
127
132
|
return self.params[item]
|
|
128
133
|
|
|
129
134
|
def __setitem__(self, item: int, value: SkylineParameterLike) -> None:
|
|
130
135
|
if not is_skyline_parameter_like(value):
|
|
131
136
|
raise TypeError(
|
|
132
|
-
f"
|
|
137
|
+
f"It is impossible to set item {item} of SkylineVector with value {value} of type {type(value)}. Please provide a SkylineParameterLike object (i.e., a scalar or a SkylineParameter)."
|
|
133
138
|
)
|
|
134
139
|
self.params[item] = skyline_parameter(value)
|
|
135
140
|
|
|
136
141
|
|
|
137
|
-
def skyline_vector(x:
|
|
142
|
+
def skyline_vector(x: SkylineVectorCoercible, N: int) -> SkylineVector:
|
|
138
143
|
if is_skyline_parameter_like(x):
|
|
139
144
|
return SkylineVector([skyline_parameter(x)] * N)
|
|
140
|
-
|
|
145
|
+
elif is_many_skyline_parameters_like(x):
|
|
141
146
|
x = SkylineVector(x)
|
|
147
|
+
elif not isinstance(x, SkylineVector):
|
|
148
|
+
raise TypeError(
|
|
149
|
+
f"It is impossible to coerce {x} of type {type(x)} into a SkylineVector. Please provide a SkylineParameterLike object (i.e., a scalar or a SkylineParameter), or a sequence of them."
|
|
150
|
+
)
|
|
142
151
|
if x.N != N:
|
|
143
152
|
raise ValueError(
|
|
144
153
|
f"Expected a SkylineVector of size {N}, got {x} of size {x.N}."
|
|
145
154
|
)
|
|
146
155
|
return x
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
def is_skyline_vector_operand(value: object) -> TypeGuard[SkylineVectorOperand]:
|
|
150
|
-
return isinstance(value, SkylineVector) or is_skyline_parameter_like(value)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
def is_skyline_vector_like(value: object) -> TypeGuard[SkylineVectorLike]:
|
|
154
|
-
return (
|
|
155
|
-
isinstance(value, SkylineVector)
|
|
156
|
-
or is_skyline_parameter_like(value)
|
|
157
|
-
or is_many_skyline_parameters_like(value)
|
|
158
|
-
)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
def is_many_skyline_vectors_like(
|
|
162
|
-
value: object,
|
|
163
|
-
) -> TypeGuard[pgt.Many[SkylineVectorLike]]:
|
|
164
|
-
return tg.is_many(value) and all(is_skyline_vector_like(v) for v in value)
|
phylogenie/typeguards.py
CHANGED
|
@@ -24,17 +24,19 @@ def is_many_one_or_many_scalars(x: object) -> TypeGuard[pgt.Many[pgt.OneOrManySc
|
|
|
24
24
|
return is_many(x) and all(is_one_or_many_scalars(i) for i in x)
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
def is_one_or_many_ints(x: object) -> TypeGuard[pgt.OneOrMany[int]]:
|
|
28
|
-
return isinstance(x, int) or is_many_ints(x)
|
|
29
|
-
|
|
30
|
-
|
|
31
27
|
def is_many_2D_scalars(x: object) -> TypeGuard[pgt.Many2DScalars]:
|
|
32
28
|
return is_many(x) and all(is_many_scalars(i) for i in x)
|
|
33
29
|
|
|
34
30
|
|
|
35
|
-
def
|
|
31
|
+
def is_one_or_many_2D_scalars(x: object) -> TypeGuard[pgt.OneOrMany2DScalars]:
|
|
32
|
+
return isinstance(x, pgt.Scalar) or is_many_2D_scalars(x)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def is_many_one_or_many_2D_scalars(
|
|
36
36
|
x: object,
|
|
37
37
|
) -> TypeGuard[pgt.Many[pgt.OneOrMany2DScalars]]:
|
|
38
|
-
return is_many(x) and all(
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
return is_many(x) and all(is_one_or_many_2D_scalars(i) for i in x)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def is_many_3D_scalars(x: object) -> TypeGuard[pgt.Many3DScalars]:
|
|
42
|
+
return is_many(x) and all(is_many_2D_scalars(i) for i in x)
|
phylogenie/typings.py
CHANGED
|
@@ -11,12 +11,13 @@ OneOrMany2D = _T | Many2D[_T]
|
|
|
11
11
|
Scalar = int | float
|
|
12
12
|
OneOrManyScalars = OneOrMany[Scalar]
|
|
13
13
|
ManyScalars = Many[Scalar]
|
|
14
|
-
Many2DScalars = Many2D[Scalar]
|
|
15
14
|
OneOrMany2DScalars = OneOrMany2D[Scalar]
|
|
15
|
+
Many2DScalars = Many2D[Scalar]
|
|
16
|
+
Many3DScalars = Many3D[Scalar]
|
|
17
|
+
|
|
18
|
+
Vector1D = list[Scalar]
|
|
19
|
+
IntVector1D = list[int]
|
|
20
|
+
Vector2D = list[Vector1D]
|
|
21
|
+
Vector3D = list[Vector2D]
|
|
16
22
|
|
|
17
|
-
|
|
18
|
-
IntVector1D = tuple[int, ...]
|
|
19
|
-
Vector1DLike = Scalar | Vector1D
|
|
20
|
-
IntVector1DLike = int | IntVector1D
|
|
21
|
-
Vector2D = tuple[Vector1D, ...]
|
|
22
|
-
Vector3D = tuple[Vector2D, ...]
|
|
23
|
+
Data = dict[str, str | Scalar | Vector1D | Vector2D | Vector3D]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 GABRIELE MARINO
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: phylogenie
|
|
3
|
+
Version: 1.0.2
|
|
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: pandas (>=2.2.2,<3.0.0)
|
|
14
|
+
Requires-Dist: pydantic (>=2.11.5,<3.0.0)
|
|
15
|
+
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
|
16
|
+
Requires-Dist: tqdm (>=4.66.4,<5.0.0)
|
|
17
|
+
Requires-Dist: treesimulator (>=0.2.15,<0.3.0)
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
<p align="center">
|
|
21
|
+
<img src="https://raw.githubusercontent.com/gabriele-marino/phylogenie/main/logo.png" style="width:100%; height:auto;"/>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
[](https://github.com/evolbioinfo/treesimulator)
|
|
27
|
+
[](https://tgvaughan.github.io/remaster/)
|
|
28
|
+
[](https://iqtree.github.io/doc/AliSim)
|
|
29
|
+
|
|
30
|
+
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!
|
|
31
|
+
|
|
32
|
+
## ✨ Features
|
|
33
|
+
|
|
34
|
+
Phylogenie comes packed with useful features, including:
|
|
35
|
+
|
|
36
|
+
- **Simulate tree and multiple sequence alignment (MSA) datasets from parameter distributions** 🌳🧬
|
|
37
|
+
Define distributions over your parameters and sample a different combination of parameters for each dataset sample.
|
|
38
|
+
|
|
39
|
+
- **Automatic metadata management** 🗂️
|
|
40
|
+
Phylogenie stores each parameter combination sampled during dataset generation in a `.csv` file.
|
|
41
|
+
|
|
42
|
+
- **Generalizable configurations** 🔄
|
|
43
|
+
Easily apply the same configuration across multiple dataset splits (e.g., train, validation, test).
|
|
44
|
+
|
|
45
|
+
- **Multiprocessing support** ⚙️💻
|
|
46
|
+
Simply specify the number of cores to use, and Phylogenie handles multiprocessing automatically.
|
|
47
|
+
|
|
48
|
+
- **Pre-implemented parameterizations** 🎯
|
|
49
|
+
Include canonical, fossilized birth-death, epidemiological, birth-death with exposed-infectious (BDEI), contact-tracing (CT), and more.
|
|
50
|
+
|
|
51
|
+
- **Skyline parameter support** 🪜
|
|
52
|
+
Support for piece-wise constant parameters.
|
|
53
|
+
|
|
54
|
+
- **Arithmetic operations on parameters** 🧮
|
|
55
|
+
Perform flexible arithmetic operations between parameters directly within the config file.
|
|
56
|
+
|
|
57
|
+
- **Support for common phylogenetic simulation tools** 🛠️
|
|
58
|
+
Compatible backends include ReMASTER, TreeSimulator, and AliSim.
|
|
59
|
+
|
|
60
|
+
- **Modular and extendible architecture** 🧩
|
|
61
|
+
Easily add new simulation backends as needed.
|
|
62
|
+
|
|
63
|
+
## 📦 Installation
|
|
64
|
+
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).
|
|
65
|
+
|
|
66
|
+
Once you have Python set up, you can install Phylogenie directly from PyPI:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install phylogenie
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Or install from source:
|
|
73
|
+
```bash
|
|
74
|
+
git clone https://github.com/gabriele-marino/phylogenie.git
|
|
75
|
+
cd phylogenie
|
|
76
|
+
pip install .
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 🛠 Backend dependencies
|
|
80
|
+
|
|
81
|
+
Phylogenie works with the following simulation backends:
|
|
82
|
+
|
|
83
|
+
- **[TreeSimulator](https://github.com/evolbioinfo/treesimulator)**
|
|
84
|
+
A [Python](https://www.python.org/) package for simulating phylogenetic trees. It is automatically installed with Phylogenie, so you can use it right away.
|
|
85
|
+
|
|
86
|
+
- **[ReMASTER](https://tgvaughan.github.io/remaster/)**
|
|
87
|
+
A [BEAST2](https://www.beast2.org/) package designed for tree simulation. To use ReMASTER as a backend, you need to install it separately.
|
|
88
|
+
|
|
89
|
+
- **[AliSim](https://iqtree.github.io/doc/AliSim)**
|
|
90
|
+
A tool for simulating multiple sequence alignments (MSAs). It is distributed with [IQ-TREE](https://iqtree.github.io/) and also requires separate installation if you wish to use it as a backend.
|
|
91
|
+
|
|
92
|
+
## 🚀 Quick Start
|
|
93
|
+
|
|
94
|
+
Once you have installed Phylogenie, check out the [examples](https://github.com/gabriele-marino/phylogenie/tree/main/examples) folder.
|
|
95
|
+
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.
|
|
96
|
+
|
|
97
|
+
For quick start, pick your favorite config file and run Phylogenie with:
|
|
98
|
+
```bash
|
|
99
|
+
phylogenie examples/<config_file>.yaml
|
|
100
|
+
```
|
|
101
|
+
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.
|
|
102
|
+
|
|
103
|
+
>❗ *Tip*: Can’t choose just one config file?
|
|
104
|
+
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!
|
|
105
|
+
|
|
106
|
+
## 📖 Documentation
|
|
107
|
+
|
|
108
|
+
- 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.
|
|
109
|
+
- 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.
|
|
110
|
+
|
|
111
|
+
## 📄 License
|
|
112
|
+
|
|
113
|
+
This project is licensed under [MIT License](https://raw.githubusercontent.com/gabriele-marino/phylogenie/main/LICENSE.txt).
|
|
114
|
+
|
|
115
|
+
## 📫 Contact
|
|
116
|
+
|
|
117
|
+
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).
|
|
118
|
+
|
|
119
|
+
If you need help with the configuration files, feel free to reach out — I am always very available and happy to assist!
|
|
120
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
phylogenie/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
phylogenie/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
phylogenie/backend/remaster/__init__.py,sha256=g1oMKi6SX60Geq_e2AjBlf7-pDvLfrsT3gW6AORdbMo,509
|
|
4
|
+
phylogenie/backend/remaster/generate.py,sha256=Sb5izUQO0GmUcIEMoXtHWLsh9c4vIeyNIUm7u4RVLdw,6100
|
|
5
|
+
phylogenie/backend/remaster/reactions.py,sha256=oc2ZY9WtTajbOWjARDmA0JnS255tbVeMt1DmyCUp95M,5904
|
|
6
|
+
phylogenie/backend/treesimulator.py,sha256=wvN7WZwUKGPWt7AetumQz1ZrUc4k_D6lftSaYG1hNBg,4587
|
|
7
|
+
phylogenie/configs.py,sha256=HtRUWZ-zNq1--zTBWL3QFXX27Ybw5x1qSWcmx7Sz8YA,125
|
|
8
|
+
phylogenie/core/__init__.py,sha256=pvQMohKFAPaSvujw7H5sQJn7SOSqENQUHECuVfUBVNg,402
|
|
9
|
+
phylogenie/core/configs.py,sha256=QwY4Pxw7Cwx80ySxJMCBFDlJdmactKF_R-lhs8QcsbE,1136
|
|
10
|
+
phylogenie/core/context/__init__.py,sha256=ZiCweJgf1REKbhZTfHuzz1lIgVmio9bTYW3-srOUqUo,168
|
|
11
|
+
phylogenie/core/context/configs.py,sha256=zd-ADFzJbb6KPkol-tXxSdS8LUBeQYQq8fDzXot8WM0,730
|
|
12
|
+
phylogenie/core/context/distributions.py,sha256=QF14tM2ibjE7f6WK3s4hTaz_sLQBTNVr2ZBNe2refeE,3059
|
|
13
|
+
phylogenie/core/context/factories.py,sha256=QO96wZwrQbgX2Rkd0wY3qQDahiZ8fDg8Mg8KKY0lr2c,1390
|
|
14
|
+
phylogenie/core/dataset.py,sha256=mgPAexXTat6x7YB9-BI6d5HWwrAvt8xydmiWVzwVD3M,2431
|
|
15
|
+
phylogenie/core/factories.py,sha256=1ZXGWV8kWn-LZjb5dFk4LrWNtyhLGyH7jQ0DuuVjWN0,8912
|
|
16
|
+
phylogenie/core/msas/__init__.py,sha256=-2XjTmiTA6zAwiLs2ksKecCrSbNLheo7KKjDyvuLipg,207
|
|
17
|
+
phylogenie/core/msas/alisim.py,sha256=TG4LAHJaH3rGWa3cwXzX6MgaXuh2tLzhdoALyOkoiXY,1047
|
|
18
|
+
phylogenie/core/msas/base.py,sha256=cKH0FGALmObmOLZ2dJ3vrpb3jTLg2oeWJsIE6HznJ0Q,1803
|
|
19
|
+
phylogenie/core/trees/__init__.py,sha256=epKgJ-EI04kBEuS4kfBcnsAj7dMObT1T742peBAnB78,335
|
|
20
|
+
phylogenie/core/trees/base.py,sha256=sNBCJRtWGYaMog4WoyAkrK4F2SXrgjXrxjuVQ6Ae5Js,305
|
|
21
|
+
phylogenie/core/trees/remaster/__init__.py,sha256=FfgXYjkeosb22Anbp78re2NssWtNcNNaj7hFQZx8JLE,116
|
|
22
|
+
phylogenie/core/trees/remaster/configs.py,sha256=d4EqowYMb5I2TfBTgNf9H_X1t8aNCYJbh1RQmFoDxs4,362
|
|
23
|
+
phylogenie/core/trees/remaster/factories.py,sha256=qla4pg4OgfE5lwQZuP3bEaMt7xIF4P6fQ1Z0IPpFxUs,812
|
|
24
|
+
phylogenie/core/trees/remaster/generator.py,sha256=og6GfsLyVR88A5Yd1PetiPpy7ZcYiyeGSNyWzqe-vsY,7428
|
|
25
|
+
phylogenie/core/trees/treesimulator.py,sha256=rgYuL-A40vPR9uWp-t0Rg2d5TNrwodELYqsb4AKVwAA,5951
|
|
26
|
+
phylogenie/core/typeguards.py,sha256=yxTdE4G_1gjBFqplyei-GKz4KZo2KFh8qsEsPQ2Z5OQ,794
|
|
27
|
+
phylogenie/main.py,sha256=n_joau3dWJIq0ZMHe4a_1_2GigTFagkfzUFuQEMlyRI,1158
|
|
28
|
+
phylogenie/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
+
phylogenie/skyline/__init__.py,sha256=7pF4CUb4ZCLzNYJNhOjpuTOLTRhlK7L6ugfccNqjIGo,620
|
|
30
|
+
phylogenie/skyline/matrix.py,sha256=WH1aT23hv4QYuH4GDwcJgahrqcgB4mulfzKLGUx3R6M,7091
|
|
31
|
+
phylogenie/skyline/parameter.py,sha256=wrtvQDho3OC5tzrMnnFTy95GXaYN20KN8P5Gwyf-rHI,4023
|
|
32
|
+
phylogenie/skyline/vector.py,sha256=NgmVbWjWG_itZ9a57q9QqSybvG9-Cr9X264RGPVyp_Q,6399
|
|
33
|
+
phylogenie/typeguards.py,sha256=WBOSJSaOC8VDtrYoA2w_AYEXTpyKdCfmsM29KaKXl3A,1350
|
|
34
|
+
phylogenie/typings.py,sha256=93VRedBxrpzXkT4uaNu_1JiMzsOjp7fUy4kLv_eYxUE,565
|
|
35
|
+
phylogenie-1.0.2.dist-info/LICENSE.txt,sha256=NUrDqElK-eD3I0WqC004CJsy6cs0JgsAoebDv_42-pw,1071
|
|
36
|
+
phylogenie-1.0.2.dist-info/METADATA,sha256=5RcgFLDSlV90GTGBblQdur97pV2C0drYMg_EGKytHD8,6251
|
|
37
|
+
phylogenie-1.0.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
38
|
+
phylogenie-1.0.2.dist-info/entry_points.txt,sha256=Rt6_usN0FkBX1ZfiqCirjMN9FKOgFLG8rydcQ8kugeE,51
|
|
39
|
+
phylogenie-1.0.2.dist-info/RECORD,,
|
phylogenie/core/typings.py
DELETED
phylogenie/utils.py
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
from typing import overload
|
|
2
|
-
|
|
3
|
-
import phylogenie.typeguards as tg
|
|
4
|
-
import phylogenie.typings as pgt
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@overload
|
|
8
|
-
def vectorify1D(x: pgt.OneOrMany[int]) -> pgt.IntVector1D: ...
|
|
9
|
-
@overload
|
|
10
|
-
def vectorify1D(x: pgt.OneOrManyScalars | None) -> pgt.Vector1D: ...
|
|
11
|
-
def vectorify1D(x: pgt.OneOrManyScalars | None) -> pgt.Vector1D:
|
|
12
|
-
if x is None:
|
|
13
|
-
return ()
|
|
14
|
-
if isinstance(x, pgt.Scalar):
|
|
15
|
-
return (x,)
|
|
16
|
-
if tg.is_many_scalars(x):
|
|
17
|
-
return tuple(x)
|
|
18
|
-
raise TypeError(
|
|
19
|
-
f"It is impossible to coerce {x} of type {type(x)} into a 1D vector. Please provide a scalar or a sequence of scalars."
|
|
20
|
-
)
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: phylogenie
|
|
3
|
-
Version: 1.0.0
|
|
4
|
-
Summary: Generate phylogenetic datasets with minimal set up overhead
|
|
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: pandas (>=2.2.2,<3.0.0)
|
|
14
|
-
Requires-Dist: pydantic (>=2.11.5,<3.0.0)
|
|
15
|
-
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
|
16
|
-
Requires-Dist: tqdm (>=4.66.4,<5.0.0)
|
|
17
|
-
Requires-Dist: treesimulator (>=0.2.15,<0.3.0)
|
|
18
|
-
Description-Content-Type: text/markdown
|
|
19
|
-
|
|
20
|
-
<p align="center">
|
|
21
|
-
<img src="logo.png" alt="Project Logo" style="width:100%; height:auto;" />
|
|
22
|
-
</p>
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
[](https://github.com/evolbioinfo/treesimulator)
|
|
27
|
-
[](https://tgvaughan.github.io/remaster/)
|
|
28
|
-
[](https://iqtree.github.io/doc/AliSim)
|
|
29
|
-
|
|
30
|
-
**Phylogenie** is a Python package designed to easily simulate phylogenetic datasets—such as trees and multiple sequence alignments—with minimal setup effort.
|
|
31
|
-
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
phylogenie/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
phylogenie/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
phylogenie/backend/remaster/__init__.py,sha256=g1oMKi6SX60Geq_e2AjBlf7-pDvLfrsT3gW6AORdbMo,509
|
|
4
|
-
phylogenie/backend/remaster/generate.py,sha256=mMYsHkSjXEd4nEYqFf5msmTPeWZqOopsKtOGt139TpA,6146
|
|
5
|
-
phylogenie/backend/remaster/reactions.py,sha256=UMXW-cEeWGOqTbf9CtHf9GMgfofT5apxZUiBpr8YVBU,5819
|
|
6
|
-
phylogenie/backend/treesimulator.py,sha256=ReJ1KTSKVSmAS4vGn1-XKYKqXluYX6uFSNjCs3kGISg,4557
|
|
7
|
-
phylogenie/configs.py,sha256=HtRUWZ-zNq1--zTBWL3QFXX27Ybw5x1qSWcmx7Sz8YA,125
|
|
8
|
-
phylogenie/core/__init__.py,sha256=pvQMohKFAPaSvujw7H5sQJn7SOSqENQUHECuVfUBVNg,402
|
|
9
|
-
phylogenie/core/configs.py,sha256=8E2uknl3SGFt1XhwIM_rJYMkC_PsHJFlcuC25YLj2c4,989
|
|
10
|
-
phylogenie/core/context/__init__.py,sha256=ZiCweJgf1REKbhZTfHuzz1lIgVmio9bTYW3-srOUqUo,168
|
|
11
|
-
phylogenie/core/context/configs.py,sha256=zd-ADFzJbb6KPkol-tXxSdS8LUBeQYQq8fDzXot8WM0,730
|
|
12
|
-
phylogenie/core/context/distributions.py,sha256=QF14tM2ibjE7f6WK3s4hTaz_sLQBTNVr2ZBNe2refeE,3059
|
|
13
|
-
phylogenie/core/context/factories.py,sha256=2gmvG5abZmmVcCfWie0L3jnwZxgZ0TtV1XElSnZgDzo,1459
|
|
14
|
-
phylogenie/core/dataset.py,sha256=ZiMkSAWmhJU6XXxuvm9n6vTCPdEChH1_oN75qrCUGI0,2431
|
|
15
|
-
phylogenie/core/factories.py,sha256=XEijHIGCxikUhq_IGTq79MppvGXJVX6nIkf3a36ifa4,5972
|
|
16
|
-
phylogenie/core/msas/__init__.py,sha256=-2XjTmiTA6zAwiLs2ksKecCrSbNLheo7KKjDyvuLipg,207
|
|
17
|
-
phylogenie/core/msas/alisim.py,sha256=iF0Urq1wc83oEscZ35drAlBquinWi13MXXfFg2OqUZc,1051
|
|
18
|
-
phylogenie/core/msas/base.py,sha256=oQpEcxguLd79sxY1cNlL_cqhuq5Ef6Lny6FJvQ2CCdU,1803
|
|
19
|
-
phylogenie/core/trees/__init__.py,sha256=epKgJ-EI04kBEuS4kfBcnsAj7dMObT1T742peBAnB78,335
|
|
20
|
-
phylogenie/core/trees/base.py,sha256=sNBCJRtWGYaMog4WoyAkrK4F2SXrgjXrxjuVQ6Ae5Js,305
|
|
21
|
-
phylogenie/core/trees/remaster/__init__.py,sha256=FfgXYjkeosb22Anbp78re2NssWtNcNNaj7hFQZx8JLE,116
|
|
22
|
-
phylogenie/core/trees/remaster/configs.py,sha256=Bp1-Oj3Vac1_S6VdofGxHjp_0FAACrIBDo8w0NbTS2Q,377
|
|
23
|
-
phylogenie/core/trees/remaster/factories.py,sha256=F7BAWj2Y-2bmQfPGW73lyvQxUgHjRpx1eEzKZLIZ4hk,863
|
|
24
|
-
phylogenie/core/trees/remaster/generator.py,sha256=o_eZ-7bLLs6yc2t1NNk8_ib7CPRLoYRUAN6rljr86Co,7036
|
|
25
|
-
phylogenie/core/trees/treesimulator.py,sha256=Z8OwmFU1RgwW3omprd982Qb7n1bW0zLaPpAFzagWzhQ,5855
|
|
26
|
-
phylogenie/core/typeguards.py,sha256=nxgN8NjiasKR2AJ3USELp4uUHEyNjJmOstYqqLpRtDg,1133
|
|
27
|
-
phylogenie/core/typings.py,sha256=4b50GphFOT8fEZ9qsnDYhx7uqDUxA5yly83BiSlpCgI,171
|
|
28
|
-
phylogenie/main.py,sha256=n_joau3dWJIq0ZMHe4a_1_2GigTFagkfzUFuQEMlyRI,1158
|
|
29
|
-
phylogenie/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
-
phylogenie/skyline/__init__.py,sha256=a7VRGPtZvyfkonlYhjn6pJ5aw1_iyGxYFby3Lf8wheo,518
|
|
31
|
-
phylogenie/skyline/matrix.py,sha256=RgTzSnZ8vml6OBkS4h5MDonkb3PkYwu_U7Vo0-mpVOk,7395
|
|
32
|
-
phylogenie/skyline/parameter.py,sha256=4bFX3RZLnKr2NrrgJVSf-7V2a6aa8ihR6205sp6PX_M,3585
|
|
33
|
-
phylogenie/skyline/vector.py,sha256=U66oRwx3FN5HSiIAy-9pAKz-ft62JqTKUtp6Sb5zyEg,6243
|
|
34
|
-
phylogenie/typeguards.py,sha256=3EwPVxQfJ8IOp33-tkbCwLFCmLh7OyKcyLyhUkJuwoU,1230
|
|
35
|
-
phylogenie/typings.py,sha256=aYAbZlvtbijxz9nYwRmhE8kbuYGgZAa95pvrUGEWz2Q,562
|
|
36
|
-
phylogenie/utils.py,sha256=Omj4NOlnA0iZiyAzeWtsUq7G5sv-0cqxPJTiH2phcmk,615
|
|
37
|
-
phylogenie-1.0.0.dist-info/METADATA,sha256=3FhNhpLDJ4Qh5voXg0Xd1dORZ0I08YNVBjwVKe15sq0,1369
|
|
38
|
-
phylogenie-1.0.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
39
|
-
phylogenie-1.0.0.dist-info/entry_points.txt,sha256=Rt6_usN0FkBX1ZfiqCirjMN9FKOgFLG8rydcQ8kugeE,51
|
|
40
|
-
phylogenie-1.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|