Skip to content

Commit

Permalink
fixing display name error
Browse files Browse the repository at this point in the history
  • Loading branch information
ViralVerity committed Sep 14, 2020
1 parent b90f5f7 commit 63656ce
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions civet/scripts/make_tree_figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def display_name(tree, tree_name, tree_dir, full_taxon_dict, query_dict, custom_
for k in tree.Objects:
if k.branchType == 'leaf':
name = k.name

display_name = ""
if "inserted" in name:
collapsed_node_info, number_nodes = summarise_collapsed_node_for_label(tree_dir, name, tree_name, full_taxon_dict)
k.traits["display"] = collapsed_node_info
Expand All @@ -94,16 +94,17 @@ def display_name(tree, tree_name, tree_dir, full_taxon_dict, query_dict, custom_
else:
display_name = display_name + "|" + taxon_obj.attribute_dict[label_element]
count += 1
k.traits["display"] = display_name

k.traits["display"] = display_name

k.node_number = 1


else:
if name.startswith("subtree"):
number = name.split("_")[-1]
display = f"Tree {number}"
k.traits["display"] = display
display_name = f"Tree {number}"
k.traits["display"] = display_name
k.node_number = 1
else:
k.traits["display"] = name + "|" + "not in dict"
Expand Down

0 comments on commit 63656ce

Please sign in to comment.