Phylogenetic Tree

by Jeff Pittman last modified Feb 16, 2011 02:15 AM

PhylogeneticTree draws "evolutionary tree" diagrams for representing the evolutionary history of a group of organisms. PhylogeneticTree focuses on the standard cladogram, skewed right, showing branches and nodes of the tree spreading from lower left, and with the taxon names (organism, or organism group names) arrayed across the top in the leaf positions. The program is primarily designed for web presentation of known cladograms. It has its own simple data design treating the cladogram as having a given number of rows, which lie vertically between levels of the nodes, and columns, which are the lateral internode spacings. Input includes a few settings for the layout of the diagram and the main data, which includes two data series in CSV format: one for the character and character descriptions and the other for the node descriptions. Node descriptions require the user to draw an existing cladogram on graph paper to gather data for row and column position of the nodes. Once you have learned the data format, specification of node data is straightforward.

Project Description

LICENSE

  • GPL: See PhylogeneticTree.py header.

CREDITS

AUTHORSHIP

DESCRIPTION

PhylogeneticTree uses the ReportLab toolkit to generate a phylogenetic tree plot and its own routines to emit SVG and simple HTML renderings.

PhylogeneticTree is a folderish Archetypes-based Plone/Zope product. The idea is to use various renderers to create images, PDF files, and/or SVG versions of the cladogram and store them. This allows flexibility for a user of PhylogeneticTree to offer several format versions, if needed. PhylogeneticTree takes input of the following items:

Javascript tooltips are used to show short descriptions of characters when the user mouses over a node.

  • row height (vertical internode spacing, in pixels)
  • column width (lateral internode spacing, in pixels)
  • characters, entered as comma-separated values on separate lines. Characters are specified by:
    • character number (for easy reference in the node descriptions)
    • short description
    • long description
  • nodes, entered as comma-separated values on separate lines. Nodes are specified by:
    • parent (taxon name of parent)
    • taxon name
    • characters (entered like this, by character number: [1,2,4,9])
    • row position
    • column position
    • font size
    • line style (solid, dashed)
    • line base style (connected, gapped)
    • line stroke width
    • branch direction (root, left, up, right)
    • line color (line_red, line_green, line_blue (each 0-255)
    • node style (circle_solid, circle_open, square_solid, square_open)
    • node size (in pixels)
    • node skew (angle, negative for left, 0 for up, positive for right)
    • node color (node_red, node_green, node_blue (each 0-255)

REQUIREMENTS

PLATFORM NOTES

  • So far, testing has only been done on Linux. Browser testing has been done with Internet Explorer and Opera 8.01, and also with Mozilla Firefox DeerPark 2 Alpha. Deerpark 2 pops up a save box when viewing SVG, instead of rendering the SVG on the page -- combinations of embed, object, and iframe tags were used to no avail to get Deerpark 2 to render on the page (although it seems that it worked under some combination).
  • Opera doesn't show the tooltips at all.

INSTALLATION

  1. Install Adobe Acrobat Reader, taking note of its installation directory.
  2. Install the ReportLab toolkit, first editing rl_config.py in the reportlab directory to set the Acrobat directory, if needed, so the fonts will be found by the renderer.
  3. Install the renderPM addon from ReportLab.org.
  4. Put PhylogeneticTree in your Zope Products directory.
  5. Restart Zope.
  6. Install PhylogeneticTree into your Plone site using CMFQuickInstaller. (In Plone, select "plone setup", click on "Add/Remove Products" and install TeachingSchedule.) You can also use the portal_quickinstaller tool from the ZMI to install the Product.

DERIVATIONS

A phylogenetic tree is basically a graph, so perhaps someone could find use for modifying it to show network diagrams and such, although the data input format is likely highly specific to the task at hand, and is thus very simple. The method of actually drawing the tree (or graph, should other branching relationships be treated) on graph paper and simple tabulating the row and column position of the nodes is really easy, and even for complicated graphs it should be easy to get a nice plot. Who knows, this simple method of data entry might not be so bad for serious use cases.

TO DO

  • Add support for reading Nexus and other standard phylogenetic tree formats.
  • Parse the "Tree of Life" and produce PhylogenticTrees for each cladogram there!
  • Add label placement data to node descriptions so that a graph of any orientation could be depicted without label problems.
  • Add data to the node description to support interfacing with GeologicTimeScale, at least for values in millions of years. Perhaps instead of entering the row and column data as integer values, use values in millions of years. This would allow color-coding of nodes for age, or plotting a background of colored bands representing the geologic time units. GeologicTimeScale could use this version for plotting phylogenetic trees alongside the time scale.
  • Add functionality for adding images for nodes. One way would have uploaded images follow a naming scheme wherein the main plotting routine would search the folder for images matching the nodes, and when found make a tooltip including the image.
  • Add a field for images that would be for CSV data specifying the image name and the x and y pixel values for the location on the plot, or the associated node. This would allow plotting of thumbnail images of organisms directly on the plot.
  • Add a freeform label field for CSV data specifying any label and location.

BUGS AND FEATURE REQUESTS

Please report bugs and feature requests to Jeff Pittman, who can be reached at jeff@geojeff.org. Jeff is often on the #plone irc channel as geojeff.

Current Release

No stable release available yet.

All Releases

Version Released Description Compatibility Status
0.1alpha First release. More about this release…
Plone 2.0.5
alpha

Comments (0)