Skip to content

Commit

Permalink
generate tests updated for toytree
Browse files Browse the repository at this point in the history
  • Loading branch information
eaton-lab committed Jan 7, 2025
1 parent 6b6c329 commit 9e7dd5a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ipyrad/analysis/baba2.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,10 +857,10 @@ def __init__(self, tree, constraint_dict, constraint_exact):

# tree to traverse
if isinstance(tree, toytree.ToyTree):
self.tree = tree.copy()
tree = tree.copy()
else:
self.tree = toytree.tree(tree)
if not self.tree.is_rooted():
tree = toytree.tree(tree)
if not tree.is_rooted():
raise IPyradError(
"generate_tests_from_tree(): tree must be rooted and resolved")

Expand Down Expand Up @@ -895,7 +895,7 @@ def __init__(self, tree, constraint_dict, constraint_exact):
self.xdict = np.array(self.xdict).astype(bool)

# get tests
self.loop(self.tree.treenode)
self.loop(tree.treenode)

# order and check redundancy
tests = []
Expand Down

0 comments on commit 9e7dd5a

Please sign in to comment.