Skip to content

Commit

Permalink
fix 0.PE subclades and add blank label
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed May 4, 2021
1 parent 51a9883 commit 6b03980
Show file tree
Hide file tree
Showing 3 changed files with 671 additions and 580 deletions.
1,206 changes: 645 additions & 561 deletions workflow/notebooks/auspice.py.ipynb

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion workflow/notebooks/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def auspice_export(

def branch_attributes(tree_dict, sub_dict, df, label_col):
"""
Add branch attributes to an auspice tree
Add branch attributes to an auspice tree.
"""
root = sub_dict
if "children" not in root:
Expand All @@ -371,6 +371,9 @@ def branch_attributes(tree_dict, sub_dict, df, label_col):
.replace("_", " ")
.title()
)
# clade needs to stay lowercase
if col == "clade":
col_pretty = "clade"
branch_labels[col_pretty] = df[col][node["name"]]

node["branch_attrs"]["labels"] = branch_labels
Expand All @@ -383,6 +386,9 @@ def branch_attributes(tree_dict, sub_dict, df, label_col):
.replace("_", " ")
.title()
)
# clade needs to stay lowercase
if col == "clade":
col_pretty = "clade"
branch_labels[col_pretty] = df[col][node["name"]]
root["branch_attrs"]["labels"] = branch_labels
return root
Expand Down
37 changes: 19 additions & 18 deletions workflow/notebooks/iqtree_stats.py.ipynb

Large diffs are not rendered by default.

0 comments on commit 6b03980

Please sign in to comment.