[BioPython] Phylogeny tree plotting? (was: Generating Figures in Python)

Jan T. Kim kim@inb.mu-luebeck.de
Wed, 11 Apr 2001 15:39:00 +0200


On Thu, Apr 05, 2001 at 09:06:52PM -0600, Andrew Dalke wrote:

> >Using the really excellent
> >reportlab distribution (http://www.reportlab.com),

[...]

> >http://www.bioinformatics.org/bradstuff/lab/cotton_locations-all.pdf
> 
> Cool!  Much better than the little bit I managed to write.
> (I think I'll stay out of the 2D world for a while more :)

Looks very nice to me too.

But, the subject of this thread prompts me to ask for another graphics
functionality which I'd like to see in BioPython: Phylogenetic trees.

Initial question: Are there any utilities for plotting trees already
(which I might have overlooked)? Are there already plans for such a
project?

Some background / motivation for my question / additional info:

The traditional format for saving phylogenies is the "New Hampshire"
format, and there are some tools for rendering these graphically. However,
they never seem to provide all functions that I need. These include:

    * Rendering trees in various ways, i.e. "V-shaped", rectangular,
      with radiating branches etc.

    * Replacement of "computer friendly" sequence names with "scientist
      friendly" ones (i.e. names containing slashes or other characters
      unsuitable for file names, longer names that needed to be
      abbreviated in the process of generating PHYLIP formatted
      multiple alignments etc.).

    * Addition of species names to sequence names

    * Adding colour and other additional visual elements to labels

    * Comparing different trees and rendering common edges in
      various ways (e.g. for bootstrap analyses, but also useful for
      much broader applications).

    * Adding "higher order" information, e.g. highlighting the least
      common ancestor of a group of OTUs, generate shaded boxes or
      braces showing groups of OTUs etc.

Over a couple of years, I've produced a C program for generating PostScript
tree graphics out of New Hampshire formatted trees which addresses these
demands and satisfies them -- to a greater or lesser extent. This hack
has reached a stage where a major redesign is due, and I started thinking
that it might be a good idea to redo the whole thing in Python / Biopython.

What do you think?

Greetinx, Jan
-- 
 +- Jan T. Kim -------------------------------------------------------+
 |  *NEW* -->  email: kim@inb.mu-luebeck.de                           |
 |  *NEW* -->  WWW:   http://www.inb.mu-luebeck.de/staff/kim.html     |
 *-----=<  hierarchical systems are for files, not for humans  >=-----*