outfile_name = args[0]
path_to_draw_map_task = args[1]
lineage_files = args[2:]

def print_recursive( id, tree ):
    print id
    print tree[id]
    for child in tree[id]['children'].keys():
        print_recursive( child, tree )

tree = {}

tree_phylogeny = Tree()

ts = TreeStyle()
ts.show_leaf_name = False
ts.branch_vertical_margin = 10
#ts.scale = .1


def getNodeStyle( dictionary ):
    aStyle = NodeStyle()
    for key in dictionary.keys():
        aStyle[key] = dictionary[key]

    return aStyle

## node styles
regular_node_style_fluct_bb = getNodeStyle( { 'size': 0, 'shape': 'circle', 'fgcolor': 'purple' } )
regular_node_style_fluct = getNodeStyle( { 'size': 0, 'shape': 'circle', 'fgcolor': 'darkblue' } ) 
예제 #2
0
#t = PhyloTree("RAxML_result.ITPR_LIKE_CHANNEL", alignment="hits_align.phy", alg_format="iphylip")
#t.show()

t = Tree(args.trees[0])


#Get leaves
#names = t.get_leaf_names()

#algae = filterNames(names, re.compile('.*ALGA.*').match)
#plants = filterNames(names, re.compile('.*PLANT.*').match) 

#colourNodes(t,algae,"green")
#colourNodes(t,plants,"#4ED34E")

circle = TreeStyle()
circle.show_leaf_name = True
#circle.scale =  3
circle.mode = "c"
circle.arc_start = 0 # 0 degrees = 3 o'clock
circle.arc_span = 360
circle.show_branch_length = True

square = TreeStyle()
square.show_leaf_name = True
#square.scale = 5
square.show_branch_length = True

#t.render("out.png", tree_style=circle, dpi=48000)
#system("convert -trim out.png itpr_channel_circle.png && rm out.png")