Last active
October 13, 2016 10:42
-
-
Save jergosh/04247d499b0f0946e05f88e3594b591c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def make_layout(ann_dict): | |
def layout(node): | |
if node.is_leaf(): | |
labelFace = ete3.faces.TextFace(str(ann_dict[node.name])) | |
ete3.faces.add_face_to_node(labelFace, node, column=2, position="aligned") | |
esnFace = ete3.faces.RectFace(height=100*ann_dict[node.name], | |
width=10, | |
fgcolor="white", | |
bgcolor="red") | |
esnFace.margin_top = 5 | |
esnFace.margin_bottom = 5 | |
ete3.faces.add_face_to_node(esnFace, node, column=1, position="aligned") | |
return layout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment