Skip to content

Commit

Permalink
Merge pull request #31 from nossleinad/Phylo/uniq-nodenames
Browse files Browse the repository at this point in the history
Enforce unique nodenames
  • Loading branch information
nossleinad authored Aug 21, 2024
2 parents 540bdf2 + e0dfaa4 commit c452487
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/viz/phylo_glue.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ function add_node_to_phylo_tree(
phylo_node_name = Phylo.getnodename(phylo_tree, phylo_node)
for c in molev_node.children
if c.name != ""
new_child = Phylo.createnode!(phylo_tree, c.name)
c_phylo_name = Phylo.hasnode(phylo_tree, c.name) ? Phylo._newnodelabel(phylo_tree) * c.name : c.name #Enforce uniq names
new_child = Phylo.createnode!(phylo_tree, c_phylo_name)
else
new_child = Phylo.createnode!(phylo_tree)
end
Expand Down

0 comments on commit c452487

Please sign in to comment.