Skip to content

Instantly share code, notes, and snippets.

@maclandrol
Created June 26, 2015 14:40
Show Gist options
  • Save maclandrol/b7f45d2973f7081429e4 to your computer and use it in GitHub Desktop.
Save maclandrol/b7f45d2973f7081429e4 to your computer and use it in GitHub Desktop.
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment