phylogenetics.py¶
Tools to deal with phylogenetic stuff
-
phylogenetics.draw_tree(title, members, treefile, annofile, circlesize=12, dir='.', debug=False)[source]¶ Curry up arguments to drive a python script that uses the ETE tree drawing package, many thanks to Jaime Huerta-Cepas and SciPy 2015.
title is used as a label for the image and a prefix for the filename
members is the set of sample names
treefile is the phylip output, or any newick-format tree file.
annofile is the file of optional node annotations
circlesize is the default size of a sphere/circle/square
dir is the place to write the annotation file, default cwd.
-
phylogenetics.write_annotation(treename, members, variants, typingfunc, annodict=None, mean=None, dir='.', circlesize=12)[source]¶ Prepare an annotation file that can be used to enhance the tree drawing.
annodict is a dictionary of annotations to be fed to the ETE tree renderer by draw_tree, see that method. The default annotation dictionary is hopelessly associated with the Kadara lung field effect project.
typingfunc is function that classifies samples into classes for coloring, etc.
mean is used to normalize sample numbers, defaults to calculating the mean of the samples in the set.
dir is the place to write the annotation file, default cwd.
circlesize is the default size of a sphere/circle/square