Skip to content

Instantly share code, notes, and snippets.

@maclandrol
Created June 26, 2015 14:40

Revisions

  1. maclandrol created this gist Jun 26, 2015.
    13 changes: 13 additions & 0 deletions disptree.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    from ete2 import PhyloNode, TreeStyle
    import sys
    if(len(sys.argv)<2):
    sys.exit("Usage : python disptree.py input output")
    else:
    inputfile, output = sys.argv[1], sys.argv[2]
    t = PhyloNode(inputfile)
    ts = TreeStyle()
    ts.show_branch_length = True
    ts.show_branch_support = True
    if not output.endswith('.pdf'):
    output+='.pdf'
    t.render(output, tree_style=ts)