msasim 24.12.0__cp36-cp36m-win_amd64.whl → 25.3.0__cp36-cp36m-win_amd64.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.
Potentially problematic release.
This version of msasim might be problematic. Click here for more details.
- _Sailfish.cp36-win_amd64.pyd +0 -0
- msasim/sailfish.py +15 -5
- {msasim-24.12.0.dist-info → msasim-25.3.0.dist-info}/METADATA +1 -1
- msasim-25.3.0.dist-info/RECORD +8 -0
- msasim-24.12.0.dist-info/RECORD +0 -8
- {msasim-24.12.0.dist-info → msasim-25.3.0.dist-info}/LICENSE +0 -0
- {msasim-24.12.0.dist-info → msasim-25.3.0.dist-info}/WHEEL +0 -0
- {msasim-24.12.0.dist-info → msasim-25.3.0.dist-info}/top_level.txt +0 -0
_Sailfish.cp36-win_amd64.pyd
CHANGED
|
Binary file
|
msasim/sailfish.py
CHANGED
|
@@ -218,6 +218,7 @@ class SimProtocol:
|
|
|
218
218
|
insertion_rate: float = 0.0,
|
|
219
219
|
deletion_dist: Distribution = ZipfDistribution(1.7, 50),
|
|
220
220
|
insertion_dist: Distribution = ZipfDistribution(1.7, 50),
|
|
221
|
+
minimum_seq_size: int = 100,
|
|
221
222
|
seed: int = 0,
|
|
222
223
|
):
|
|
223
224
|
if isinstance(tree, Tree):
|
|
@@ -237,7 +238,8 @@ class SimProtocol:
|
|
|
237
238
|
self.set_insertion_rates(insertion_rate=insertion_rate)
|
|
238
239
|
self.set_deletion_length_distributions(deletion_dist=deletion_dist)
|
|
239
240
|
self.set_insertion_length_distributions(insertion_dist=insertion_dist)
|
|
240
|
-
|
|
241
|
+
self.set_min_sequence_size(min_sequence_size=minimum_seq_size)
|
|
242
|
+
|
|
241
243
|
def get_tree(self) -> Tree:
|
|
242
244
|
return self._tree
|
|
243
245
|
|
|
@@ -264,6 +266,11 @@ class SimProtocol:
|
|
|
264
266
|
def get_sequence_size(self) -> int:
|
|
265
267
|
return self._root_seq_size
|
|
266
268
|
|
|
269
|
+
def set_min_sequence_size(self, min_sequence_size: int) -> None:
|
|
270
|
+
self._sim.set_minimum_sequence_size(min_sequence_size)
|
|
271
|
+
self._min_seq_size = min_sequence_size
|
|
272
|
+
|
|
273
|
+
|
|
267
274
|
def set_insertion_rates(self, insertion_rate: Optional[float] = None, insertion_rates: Optional[List[float]] = None) -> None:
|
|
268
275
|
if insertion_rate is not None:
|
|
269
276
|
self.insertion_rates = [insertion_rate] * self._num_branches
|
|
@@ -462,15 +469,16 @@ class Simulator:
|
|
|
462
469
|
def set_replacement_model(
|
|
463
470
|
self,
|
|
464
471
|
model: _Sailfish.modelCode,
|
|
472
|
+
amino_model_file: pathlib.Path = None,
|
|
465
473
|
model_parameters: List = None,
|
|
466
474
|
gamma_parameters_alpha : float = 1.0,
|
|
467
|
-
|
|
475
|
+
gamma_parameters_categories: int = 1,
|
|
468
476
|
invariant_sites_proportion: float = 0.0
|
|
469
477
|
) -> None:
|
|
470
478
|
if not model:
|
|
471
479
|
raise ValueError(f"please provide a substitution model from the the following list: {_Sailfish.modelCode}")
|
|
472
|
-
if int(
|
|
473
|
-
raise ValueError(f"gamma_parameters_catergories has to be a positive int value: received value of {
|
|
480
|
+
if int(gamma_parameters_categories) != gamma_parameters_categories:
|
|
481
|
+
raise ValueError(f"gamma_parameters_catergories has to be a positive int value: received value of {gamma_parameters_categories}")
|
|
474
482
|
self._model_factory = _Sailfish.modelFactory(self._simProtocol._get_Sailfish_tree())
|
|
475
483
|
|
|
476
484
|
self._model_factory.set_alphabet(self._alphabet)
|
|
@@ -478,6 +486,8 @@ class Simulator:
|
|
|
478
486
|
if model_parameters:
|
|
479
487
|
raise ValueError(f"no model parameters are used in protein, recevied value of: {model_parameters}")
|
|
480
488
|
self._model_factory.set_replacement_model(model)
|
|
489
|
+
if model == MODEL_CODES.CUSTOM and amino_model_file:
|
|
490
|
+
self._model_factory.set_amino_replacement_model_file(str(amino_model_file))
|
|
481
491
|
else:
|
|
482
492
|
if model == MODEL_CODES.NUCJC and model_parameters:
|
|
483
493
|
raise ValueError(f"no model parameters in JC model, recevied value of: {model_parameters}")
|
|
@@ -489,7 +499,7 @@ class Simulator:
|
|
|
489
499
|
else:
|
|
490
500
|
self._model_factory.set_model_parameters(model_parameters)
|
|
491
501
|
|
|
492
|
-
self._model_factory.set_gamma_parameters(gamma_parameters_alpha,
|
|
502
|
+
self._model_factory.set_gamma_parameters(gamma_parameters_alpha, gamma_parameters_categories)
|
|
493
503
|
self._model_factory.set_invariant_sites_proportion(invariant_sites_proportion)
|
|
494
504
|
self._simulator.init_substitution_sim(self._model_factory)
|
|
495
505
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
_Sailfish.cp36-win_amd64.pyd,sha256=DaOu0oYFnxGlAMemnn2lxLXdW56KCQNKpB3uWIFyUOY,627712
|
|
2
|
+
msasim/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
msasim/sailfish.py,sha256=ex2EX4xSuxs6D8iBZk4ar8CjPcjWyJm2uewfk7jGJ-A,26772
|
|
4
|
+
msasim-25.3.0.dist-info/LICENSE,sha256=MgvumWWAhx44Y7XYvLMzqDUZv_Mn4nZLuC-EBl9E0l0,10483
|
|
5
|
+
msasim-25.3.0.dist-info/METADATA,sha256=8r6prqtfuwnoPydw8dKwx6oCKeLgG_Ib_pFmYOsdlhE,1503
|
|
6
|
+
msasim-25.3.0.dist-info/WHEEL,sha256=zukbZftcRdNfJ55Q_RYV9JZ3uVyqWKyq-wDJbmszs_U,101
|
|
7
|
+
msasim-25.3.0.dist-info/top_level.txt,sha256=NS1ILx5V94Yyh_M7yDrrqbBPu1TL_zJuxhsI90YEJVY,17
|
|
8
|
+
msasim-25.3.0.dist-info/RECORD,,
|
msasim-24.12.0.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
_Sailfish.cp36-win_amd64.pyd,sha256=tbAcQNnnxQwyr0wJ-taaSo_rmSE6_WPvaBlX27PNGnw,622592
|
|
2
|
-
msasim/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
msasim/sailfish.py,sha256=ElArIFObfW_1qc8no5Q0DKqTDwuF15lFibEVV0wUqzM,26261
|
|
4
|
-
msasim-24.12.0.dist-info/LICENSE,sha256=MgvumWWAhx44Y7XYvLMzqDUZv_Mn4nZLuC-EBl9E0l0,10483
|
|
5
|
-
msasim-24.12.0.dist-info/METADATA,sha256=JhV_cW2pVAlg6BLm_KV_YMVo2zdZbL4FcxtdFC_fWJI,1504
|
|
6
|
-
msasim-24.12.0.dist-info/WHEEL,sha256=zukbZftcRdNfJ55Q_RYV9JZ3uVyqWKyq-wDJbmszs_U,101
|
|
7
|
-
msasim-24.12.0.dist-info/top_level.txt,sha256=NS1ILx5V94Yyh_M7yDrrqbBPu1TL_zJuxhsI90YEJVY,17
|
|
8
|
-
msasim-24.12.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|