diff --git a/src/LineageTree/lineageTree.py b/src/LineageTree/lineageTree.py index e8629ca..7e4f258 100644 --- a/src/LineageTree/lineageTree.py +++ b/src/LineageTree/lineageTree.py @@ -355,6 +355,10 @@ def nodes(self) -> frozenset[int]: """Nodes of the tree""" return frozenset(self._successor.keys()) + @dynamic_property + def number_of_nodes(self) -> int: + return len(self.nodes) + @dynamic_property def depth(self) -> dict[int, int]: """The depth of each node in the tree.""" diff --git a/src/LineageTree/lineageTreeManager.py b/src/LineageTree/lineageTreeManager.py index 41c3677..1292b0f 100644 --- a/src/LineageTree/lineageTreeManager.py +++ b/src/LineageTree/lineageTreeManager.py @@ -430,6 +430,7 @@ def cross_lineage_edit_distance( The alignment between the nodes by the subtrees spawned by the nodes n1,n2 and the normalization function.` tuple(tree,tree), optional The two trees that have been mapped to each other. + Returned if `return_norms` is `True` """ parameters = (