phylogenie 2.1.16__py3-none-any.whl → 2.1.17__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/tree.py CHANGED
@@ -26,7 +26,7 @@ class Tree:
26
26
  @property
27
27
  def depth(self) -> float:
28
28
  if self.parent is None:
29
- return 0.0
29
+ return 0 if self.branch_length is None else self.branch_length
30
30
  if self.branch_length is None:
31
31
  raise ValueError(f"Branch length of node {self.name} is not set.")
32
32
  return self.parent.depth + self.branch_length
phylogenie/utils.py CHANGED
@@ -22,7 +22,7 @@ def get_node_depths(tree: Tree) -> dict[Tree, float]:
22
22
  depths: dict[Tree, float] = {}
23
23
  for node in tree:
24
24
  if node.parent is None:
25
- depths[node] = 0
25
+ depths[node] = 0 if node.branch_length is None else node.branch_length
26
26
  else:
27
27
  if node.branch_length is None:
28
28
  raise ValueError(f"Branch length of node {node.name} is not set.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: phylogenie
3
- Version: 2.1.16
3
+ Version: 2.1.17
4
4
  Summary: Generate phylogenetic datasets with minimal setup effort
5
5
  Author: Gabriele Marino
6
6
  Author-email: gabmarino.8601@gmail.com
@@ -16,7 +16,7 @@ phylogenie/skyline/__init__.py,sha256=7pF4CUb4ZCLzNYJNhOjpuTOLTRhlK7L6ugfccNqjIG
16
16
  phylogenie/skyline/matrix.py,sha256=Gl8OgKjtieG0NwPYiPimKI36gefV8fm_OeorjdXxPTs,9146
17
17
  phylogenie/skyline/parameter.py,sha256=EM9qlPt0JhMBy3TbztM0dj24BaGNEy8KWKdTObDKhbI,4644
18
18
  phylogenie/skyline/vector.py,sha256=bJP7_FNX_Klt6wXqsyfj0KX3VNj6-dIhzCKSJuQcOV0,7115
19
- phylogenie/tree.py,sha256=MTMm_MyJt-ExJwJXu-WUCZPZ3U_YvF4XLNqRb50cgPI,4516
19
+ phylogenie/tree.py,sha256=qaHMEcnqEtjd8Jlo2wF1vw0Gi6tcMlXngK_6IKEaQkw,4568
20
20
  phylogenie/treesimulator/__init__.py,sha256=yqS2vtYMhdWSXc9RAnX1dd4zAqSQweMLyVKTnJLfGTU,1106
21
21
  phylogenie/treesimulator/events/__init__.py,sha256=6zSgZ0MEUMvTK4yPlSolJnRWzCARLS-jYreTzh45mQo,1033
22
22
  phylogenie/treesimulator/events/contact_tracing.py,sha256=_nJ85yhgGkeruQgMHvGpDYoyhheBf8M4LgZWiWdi5dY,4801
@@ -27,9 +27,9 @@ phylogenie/treesimulator/gillespie.py,sha256=LZHB2Ko147E78LoUCtN_BN7NYO1xhMYRy5P
27
27
  phylogenie/treesimulator/model.py,sha256=Nyg6R8XmMwZMSw1-dII81sU9uU7tDe-NMs8v1qKE4_M,5746
28
28
  phylogenie/typeguards.py,sha256=JtqmbEWJZBRHbWgCvcl6nrWm3VcBfzRbklbTBYHItn0,1325
29
29
  phylogenie/typings.py,sha256=GknvAFXyiaWeeYJ8Lk5d6E2VHT-xW6ONEojYbtJYiB8,476
30
- phylogenie/utils.py,sha256=l7kJ0mkdhplz_hTUseBxaGpEKngsWUOSiCMyLMIWYZQ,1936
31
- phylogenie-2.1.16.dist-info/LICENSE.txt,sha256=NUrDqElK-eD3I0WqC004CJsy6cs0JgsAoebDv_42-pw,1071
32
- phylogenie-2.1.16.dist-info/METADATA,sha256=2Fyg0A7W9ooDxloKDdi6ZYg31fGMpRKYnDHwjgMjCGI,5477
33
- phylogenie-2.1.16.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
34
- phylogenie-2.1.16.dist-info/entry_points.txt,sha256=Rt6_usN0FkBX1ZfiqCirjMN9FKOgFLG8rydcQ8kugeE,51
35
- phylogenie-2.1.16.dist-info/RECORD,,
30
+ phylogenie/utils.py,sha256=faDicpAtjxM-QDwPKOv8AOxPe7skPUOGKmVWBZRzUbU,1990
31
+ phylogenie-2.1.17.dist-info/LICENSE.txt,sha256=NUrDqElK-eD3I0WqC004CJsy6cs0JgsAoebDv_42-pw,1071
32
+ phylogenie-2.1.17.dist-info/METADATA,sha256=TUa2AtURiUDVcWfYzt_6BQYaH7N4Izgco0O5vKVOuH0,5477
33
+ phylogenie-2.1.17.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
34
+ phylogenie-2.1.17.dist-info/entry_points.txt,sha256=Rt6_usN0FkBX1ZfiqCirjMN9FKOgFLG8rydcQ8kugeE,51
35
+ phylogenie-2.1.17.dist-info/RECORD,,