msasim 2024.5.22__cp36-cp36m-musllinux_1_1_x86_64.whl → 2024.5.2719__cp36-cp36m-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.
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._simProtocol.get_tree().get_num_leaves(), self._simProtocol.get_sequence_size())
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(), self._simProtocol._get_root())
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,57 @@
1
+ Metadata-Version: 2.1
2
+ Name: msasim
3
+ Version: 2024.5.2719
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
+ License: UNKNOWN
9
+ Platform: UNKNOWN
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Provides-Extra: test
14
+ Requires-Dist: pytest ; extra == 'test'
15
+
16
+ # Sailfish
17
+
18
+ Sailfish is a performant multiple sequence alignment(MSA) simulator, written in C++ and Python, allowing for quick and easy generation of large simulated datasets.
19
+
20
+ ## Project goals
21
+
22
+ - Ease of use
23
+ - Speed
24
+ - Modularity
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install msasim
30
+ ```
31
+
32
+ ## Example
33
+
34
+ ```python
35
+ from msasim import sailfish as sim
36
+ from msasim.sailfish import MODEL_CODES, ZipfDistribution
37
+
38
+ ROOT_SEQUENCE_LENGTH = 100
39
+
40
+ sim_protocol = sim.SimProtocol("(A:0.5,B:0.5);",
41
+ deletion_rate=0.01,
42
+ insertion_rate=0.01,
43
+ deletion_dist=ZipfDistribution(1.08, 50),
44
+ insertion_dist=ZipfDistribution(1.08, 50),
45
+ seed=50)
46
+ sim_protocol.set_sequence_size(ROOT_SEQUENCE_LENGTH)
47
+
48
+ simulation = sim.Simulator(sim_protocol, simulation_type=sim.SIMULATION_TYPE.PROTEIN)
49
+
50
+ simulation.set_replacement_model(model=MODEL_CODES.WAG,
51
+ gamma_parameters_alpha=1.0,
52
+ gamma_parameters_catergories=4)
53
+ msa = simulation()
54
+ msa.print_msa()
55
+
56
+ ```
57
+
@@ -0,0 +1,10 @@
1
+ _Sailfish.cpython-36m-x86_64-linux-gnu.so,sha256=DLarZAYUKsZHJQpL8lEqGom91hskhmLMIoR6fWJwF80,1234385
2
+ msasim-2024.5.2719.dist-info/WHEEL,sha256=rbVfYZzJiOCEiiKDVkaog3MWj3SC9SfTJ-H92vzqnHY,112
3
+ msasim-2024.5.2719.dist-info/LICENSE,sha256=p1Aa_mM2Nu6dG3XqMVU62Jhf04lNOwtXUrhhvhcDips,10312
4
+ msasim-2024.5.2719.dist-info/top_level.txt,sha256=NS1ILx5V94Yyh_M7yDrrqbBPu1TL_zJuxhsI90YEJVY,17
5
+ msasim-2024.5.2719.dist-info/RECORD,,
6
+ msasim-2024.5.2719.dist-info/METADATA,sha256=683ehP2sgYtgaGuO-HoH55icrVoe0lWgDKvh0VjLiiY,1508
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,2 +1,2 @@
1
- Sailfish
2
1
  _Sailfish
2
+ msasim
@@ -1,16 +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
- License: UNKNOWN
9
- Platform: UNKNOWN
10
- Requires-Python: >=3.6
11
- License-File: LICENSE
12
- Provides-Extra: test
13
- Requires-Dist: pytest ; extra == 'test'
14
-
15
- Sailfish is a performant multiple sequence alignment simulator, written in C++, allowing fast generation of large simualted datasets.
16
-
@@ -1,10 +0,0 @@
1
- _Sailfish.cpython-36m-x86_64-linux-gnu.so,sha256=wDu66tG2DnoqDsSenpvNOX-4aZfg17hyBs9-NRyKfOo,1199161
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=rbVfYZzJiOCEiiKDVkaog3MWj3SC9SfTJ-H92vzqnHY,112
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=2gIzialKFhrP-FmN1o7Lf_kGyAWPBHxu6WwX44JkQI0,471
File without changes