phylogenie 2.0.9__py3-none-any.whl → 2.0.11__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.
@@ -6,7 +6,7 @@ from numpy.random import default_rng
6
6
  from phylogenie.skyline import SkylineParameterLike
7
7
  from phylogenie.tree import Tree
8
8
  from phylogenie.treesimulator.events import Event, get_contact_tracing_events
9
- from phylogenie.treesimulator.model import Model, is_CT_state
9
+ from phylogenie.treesimulator.model import Model
10
10
 
11
11
 
12
12
  def simulate_tree(
@@ -29,6 +29,8 @@ def simulate_tree(
29
29
  if max_tips is None and max_time == np.inf:
30
30
  raise ValueError("Either max_tips or max_time must be specified.")
31
31
 
32
+ root_states = list({e.state for e in events})
33
+
32
34
  if notification_probability:
33
35
  events = get_contact_tracing_events(
34
36
  events,
@@ -38,7 +40,6 @@ def simulate_tree(
38
40
  )
39
41
 
40
42
  n_tries = 0
41
- root_states = [e.state for e in events if not is_CT_state(e.state)]
42
43
  while max_tries is None or n_tries < max_tries:
43
44
  root_state = init_state if init_state is not None else rng.choice(root_states)
44
45
  model = Model(root_state, max_notified_contacts, notification_probability, rng)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: phylogenie
3
- Version: 2.0.9
3
+ Version: 2.0.11
4
4
  Summary: Generate phylogenetic datasets with minimal setup effort
5
5
  Author: Gabriele Marino
6
6
  Author-email: gabmarino.8601@gmail.com
@@ -17,12 +17,12 @@ phylogenie/skyline/vector.py,sha256=bJP7_FNX_Klt6wXqsyfj0KX3VNj6-dIhzCKSJuQcOV0,
17
17
  phylogenie/tree.py,sha256=dk8Sj1tqyGOunVO2crtIqb0LH-ws-PXqA8SuNcYfVHI,1738
18
18
  phylogenie/treesimulator/__init__.py,sha256=INPU9LrPdUmt3dYGzWDRoRKrPR9xENcHu44pJVUbyNA,525
19
19
  phylogenie/treesimulator/events.py,sha256=X3_0U9qqMpYgh6-7TwQEnlUipANkHz6QTCXlm-qXFQk,9524
20
- phylogenie/treesimulator/gillespie.py,sha256=Fn-PyVICx3pWtpHko7rf6omf_kqOkkpebSJy56oPKnQ,3216
20
+ phylogenie/treesimulator/gillespie.py,sha256=4uMt_-Rr3cRXWGKC8veBIB-uqtKtN-dLbAHKjAi_5Mo,3182
21
21
  phylogenie/treesimulator/model.py,sha256=XpzAicmg2O6K0Trk5YolH-B_HJZxoSauF2wZOMqp-Iw,5559
22
22
  phylogenie/typeguards.py,sha256=JtqmbEWJZBRHbWgCvcl6nrWm3VcBfzRbklbTBYHItn0,1325
23
23
  phylogenie/typings.py,sha256=O1X6lGKTjJ2YJz3ApQ-rYb_tEJNUIcHdUIeYlSM4s5o,500
24
- phylogenie-2.0.9.dist-info/LICENSE.txt,sha256=NUrDqElK-eD3I0WqC004CJsy6cs0JgsAoebDv_42-pw,1071
25
- phylogenie-2.0.9.dist-info/METADATA,sha256=EHn9nzfQMQCfWXzl1Ddb_dTrowodP7Y4dsDQqsna2xw,5472
26
- phylogenie-2.0.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
27
- phylogenie-2.0.9.dist-info/entry_points.txt,sha256=Rt6_usN0FkBX1ZfiqCirjMN9FKOgFLG8rydcQ8kugeE,51
28
- phylogenie-2.0.9.dist-info/RECORD,,
24
+ phylogenie-2.0.11.dist-info/LICENSE.txt,sha256=NUrDqElK-eD3I0WqC004CJsy6cs0JgsAoebDv_42-pw,1071
25
+ phylogenie-2.0.11.dist-info/METADATA,sha256=H9fTgI9BaoI2j7-Od2an5dPivAxl1jk2DACT3m9DCoE,5473
26
+ phylogenie-2.0.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
27
+ phylogenie-2.0.11.dist-info/entry_points.txt,sha256=Rt6_usN0FkBX1ZfiqCirjMN9FKOgFLG8rydcQ8kugeE,51
28
+ phylogenie-2.0.11.dist-info/RECORD,,