msasim 2024.5.22__cp312-cp312-musllinux_1_1_x86_64.whl → 2024.5.2720__cp312-cp312-musllinux_1_1_x86_64.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.
- _Sailfish.cpython-312-x86_64-linux-musl.so +0 -0
- Sailfish/simulator.py → msasim/sailfish.py +16 -4
- msasim-2024.5.2720.dist-info/METADATA +54 -0
- msasim-2024.5.2720.dist-info/RECORD +10 -0
- {msasim-2024.5.22.dist-info → msasim-2024.5.2720.dist-info}/top_level.txt +1 -1
- msasim-2024.5.22.dist-info/METADATA +0 -13
- msasim-2024.5.22.dist-info/RECORD +0 -10
- {Sailfish → msasim}/__init__.py +0 -0
- {msasim-2024.5.22.dist-info → msasim-2024.5.2720.dist-info}/LICENSE +0 -0
- {msasim-2024.5.22.dist-info → msasim-2024.5.2720.dist-info}/WHEEL +0 -0
|
Binary file
|
|
@@ -368,8 +368,8 @@ class Msa:
|
|
|
368
368
|
'''
|
|
369
369
|
The MSA class from the simulator
|
|
370
370
|
'''
|
|
371
|
-
def __init__(self, species_dict: Dict[str, BlockTree], root_node):
|
|
372
|
-
self._msa = _Sailfish.Msa(species_dict, root_node)
|
|
371
|
+
def __init__(self, species_dict: Dict[str, BlockTree], root_node, save_list: List[bool]):
|
|
372
|
+
self._msa = _Sailfish.Msa(species_dict, root_node, save_list)
|
|
373
373
|
|
|
374
374
|
def generate_msas(self, node):
|
|
375
375
|
self._msa.generate_msas(node)
|
|
@@ -504,7 +504,15 @@ class Simulator:
|
|
|
504
504
|
def gen_indels(self) -> BlockTreePython:
|
|
505
505
|
return BlockTreePython(self._simulator.gen_indels())
|
|
506
506
|
|
|
507
|
+
def get_sequences_to_save(self) -> List[bool]:
|
|
508
|
+
return self._simulator.get_saved_nodes_mask()
|
|
507
509
|
|
|
510
|
+
def save_root_sequence(self):
|
|
511
|
+
self._simulator.save_root_sequence()
|
|
512
|
+
|
|
513
|
+
def save_all_nodes_sequences(self):
|
|
514
|
+
self._simulator.save_all_nodes_sequences()
|
|
515
|
+
|
|
508
516
|
def gen_substitutions(self, length: int):
|
|
509
517
|
if not self._is_sub_model_init:
|
|
510
518
|
self._init_sub_model()
|
|
@@ -515,10 +523,14 @@ class Simulator:
|
|
|
515
523
|
Msas = []
|
|
516
524
|
for _ in range(times):
|
|
517
525
|
if self._simProtocol._is_insertion_rate_zero and self._simProtocol._is_deletion_rate_zero:
|
|
518
|
-
msa = Msa(self.
|
|
526
|
+
msa = Msa(sum(self.get_sequences_to_save()),
|
|
527
|
+
self._simProtocol.get_sequence_size(),
|
|
528
|
+
self.get_sequences_to_save())
|
|
519
529
|
else:
|
|
520
530
|
blocktree = self.gen_indels()
|
|
521
|
-
msa = Msa(blocktree._get_Sailfish_blocks(),
|
|
531
|
+
msa = Msa(blocktree._get_Sailfish_blocks(),
|
|
532
|
+
self._simProtocol._get_root(),
|
|
533
|
+
self.get_sequences_to_save())
|
|
522
534
|
|
|
523
535
|
# sim.init_substitution_sim(mFac)
|
|
524
536
|
substitutions = self.gen_substitutions(msa.get_length())
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: msasim
|
|
3
|
+
Version: 2024.5.2720
|
|
4
|
+
Summary: A fast MSA simulator
|
|
5
|
+
Home-page: https://github.com/elyawy/Sailfish-backend
|
|
6
|
+
Author: Elya Wygoda
|
|
7
|
+
Author-email: elya.wygoda@gmail.com
|
|
8
|
+
Requires-Python: >=3.6
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Provides-Extra: test
|
|
12
|
+
Requires-Dist: pytest ; extra == 'test'
|
|
13
|
+
|
|
14
|
+
# Sailfish
|
|
15
|
+
|
|
16
|
+
Sailfish is a performant multiple sequence alignment(MSA) simulator, written in C++ and Python, allowing for quick and easy generation of large simulated datasets.
|
|
17
|
+
|
|
18
|
+
## Project goals
|
|
19
|
+
|
|
20
|
+
- Ease of use
|
|
21
|
+
- Speed
|
|
22
|
+
- Modularity
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install msasim
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from msasim import sailfish as sim
|
|
34
|
+
from msasim.sailfish import MODEL_CODES, ZipfDistribution
|
|
35
|
+
|
|
36
|
+
ROOT_SEQUENCE_LENGTH = 100
|
|
37
|
+
|
|
38
|
+
sim_protocol = sim.SimProtocol("(A:0.5,B:0.5);",
|
|
39
|
+
deletion_rate=0.01,
|
|
40
|
+
insertion_rate=0.01,
|
|
41
|
+
deletion_dist=ZipfDistribution(1.08, 50),
|
|
42
|
+
insertion_dist=ZipfDistribution(1.08, 50),
|
|
43
|
+
seed=50)
|
|
44
|
+
sim_protocol.set_sequence_size(ROOT_SEQUENCE_LENGTH)
|
|
45
|
+
|
|
46
|
+
simulation = sim.Simulator(sim_protocol, simulation_type=sim.SIMULATION_TYPE.PROTEIN)
|
|
47
|
+
|
|
48
|
+
simulation.set_replacement_model(model=MODEL_CODES.WAG,
|
|
49
|
+
gamma_parameters_alpha=1.0,
|
|
50
|
+
gamma_parameters_catergories=4)
|
|
51
|
+
msa = simulation()
|
|
52
|
+
msa.print_msa()
|
|
53
|
+
|
|
54
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
_Sailfish.cpython-312-x86_64-linux-musl.so,sha256=hbZ3mj5XwQX_X64AgKuDBA0tyYpGe8S5my8_8o4NfJA,1193009
|
|
2
|
+
msasim-2024.5.2720.dist-info/WHEEL,sha256=u3WJvwcnUGXBzVB5YEzh4MIq4CvlLxbaEALwCGrbBH8,113
|
|
3
|
+
msasim-2024.5.2720.dist-info/LICENSE,sha256=p1Aa_mM2Nu6dG3XqMVU62Jhf04lNOwtXUrhhvhcDips,10312
|
|
4
|
+
msasim-2024.5.2720.dist-info/top_level.txt,sha256=NS1ILx5V94Yyh_M7yDrrqbBPu1TL_zJuxhsI90YEJVY,17
|
|
5
|
+
msasim-2024.5.2720.dist-info/RECORD,,
|
|
6
|
+
msasim-2024.5.2720.dist-info/METADATA,sha256=sTra7J_hCPNlhMvIMhL0ASj-HqGczjjoNPayjJhRWH8,1472
|
|
7
|
+
msasim.libs/libstdc++-a9383cce.so.6.0.28,sha256=Wy9UCdwS1rwI9GU5e7qE61S0AkRqqwti1q_adWSs-Rk,2447393
|
|
8
|
+
msasim.libs/libgcc_s-a04fdf82.so.1,sha256=YxqJNaesQMhDswHEQpXsiLnVvMBBbYO6KYMDZFPWKSM,81257
|
|
9
|
+
msasim/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
msasim/sailfish.py,sha256=zLW65fPWCwOUDpVyq4zdZK2YsGcwMUZxnUVzeRnFVbo,24791
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: msasim
|
|
3
|
-
Version: 2024.5.22
|
|
4
|
-
Summary: A fast MSA simulator
|
|
5
|
-
Home-page: https://github.com/elyawy/Sailfish-backend
|
|
6
|
-
Author: Elya Wygoda
|
|
7
|
-
Author-email: elya.wygoda@gmail.com
|
|
8
|
-
Requires-Python: >=3.6
|
|
9
|
-
License-File: LICENSE
|
|
10
|
-
Provides-Extra: test
|
|
11
|
-
Requires-Dist: pytest ; extra == 'test'
|
|
12
|
-
|
|
13
|
-
Sailfish is a performant multiple sequence alignment simulator, written in C++, allowing fast generation of large simualted datasets.
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
_Sailfish.cpython-312-x86_64-linux-musl.so,sha256=_FHYmdOGc4RZA9HXppBuHFD9Lqhm8XShyrbq4ru2b68,1165969
|
|
2
|
-
Sailfish/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
Sailfish/simulator.py,sha256=CTFAnavIHy918aF141FKeZjO5Y-oYASI-TR5MMGGVks,24324
|
|
4
|
-
msasim.libs/libstdc++-a9383cce.so.6.0.28,sha256=Wy9UCdwS1rwI9GU5e7qE61S0AkRqqwti1q_adWSs-Rk,2447393
|
|
5
|
-
msasim.libs/libgcc_s-a04fdf82.so.1,sha256=YxqJNaesQMhDswHEQpXsiLnVvMBBbYO6KYMDZFPWKSM,81257
|
|
6
|
-
msasim-2024.5.22.dist-info/WHEEL,sha256=u3WJvwcnUGXBzVB5YEzh4MIq4CvlLxbaEALwCGrbBH8,113
|
|
7
|
-
msasim-2024.5.22.dist-info/LICENSE,sha256=p1Aa_mM2Nu6dG3XqMVU62Jhf04lNOwtXUrhhvhcDips,10312
|
|
8
|
-
msasim-2024.5.22.dist-info/top_level.txt,sha256=mVJT9Q6vqdBJyJ6acJvUdopsnVCQH7wEMQ-3iT6C-Jg,19
|
|
9
|
-
msasim-2024.5.22.dist-info/RECORD,,
|
|
10
|
-
msasim-2024.5.22.dist-info/METADATA,sha256=xZjkEbQzNYYvB1WB75UQGh14FnS4rM7CUgujkplkRkA,435
|
{Sailfish → msasim}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|