About TreeVector

TreeVector is a utility to create and integrate phylogenetic trees as Scalable Vector Graphics (SVG) files.
The software is available using a form online or for local command line use, see download page for local use version.

One of the main purposes of TreeVector is to move away from treating phylogenetic trees as end end point and final graphic, and to instead embed them in dynamic processes using web standard technologies, so that quick reference of a particular pattern or trait is possible, dynamic and up to date.

Features

TreeVector is written in Java by author Ralph Pethica at Computer Science Bristol

Download and Install

Source code for TreeVector is available here

To compile change to the TreeVector/source directory and use: javac *.java
Or to produce a JAR archive for use in a server environment: jar -cfm TreeVector.jar manifest.mf *.class

Some test input files are provide in the TreeVector/examples folder

A sample preference file can be found in TreeVector/preferences. See "Using a Preference File" for more information.

By default TreeVector creates an SVG file, an XML tree and a Newick tree output (used with prune function). These are saved to the TreeVector/temp directory by default, but another location can be specified by using command line or preference file.

The TreeVector/scripts folder contains a Javascript and CSS file, which are referenced from the output files in the temp directory. Editing these file will allow customisation of the output trees. New script locations can be set using a preference file.


Command Line Use

To run, use the command: java -jar TreeVector.jar inputfile.txt
(input filename should always be first arguement)

Command line options Using a Preference File

Most functions of TreeVector can be set using the command line, however when there are multiple commands, or embedding the application in a server it can be easier to set up a preference file.

An example of this is included with the TreeVector source and can be set using -prefs pathtofile/filename
Commands entered in any order on separate lines

Extending TreeVector - Java Files

TreeVector is written in object oriented Java with the intention of easy reading and updating of code by others.
Included in the package are 11 major Java classes representing different stages of the tree plotting process.

TreeVector - Main class to process arguements from command line and link the rest of the application together.

Node - Possibly the most important class when extending TreeVector. The tree is stored internally as a linked structure of nodes. Each node has variables which can be associated with parts of the tree, for example newick name and branch length, but can be extended to store information from databases/files/extended newick code.

NewickParser - Parses the input newick tree to the internal node structure, and identifies any errors in the input.

Explorer - Contains calculations for plotting of the tree, such as depth of nodes, and number of branches.

Coordinates - Uses above calculations to identify coordinates of nodes of the tree. All calculations are stored in the node data structures

SVG - Outputs SVG graphics for coordinates above and adds labels and extra information.

Preferences - Reads in preference file, and updates variables. All preferences are stored in this class.

Error - Error class handles output of errors and warnings from the application.

DatabaseAccess - A very generic class used to access a database and add information to ExtraData list.

ExtraData - Handles addition of extra data to the tree. This data is associated with a node name as an identifier

ProcessNames - This class allows the 'pruning' of a tree, by removing nodes and rebuilding the internal node structure.


Integration With Other Servers

Commands can be send to the script at the TreeVector site on SUPERFAMILY server.
Instructions can be found on the Integrate page.

In the source code of the project there are various additional classes, which can be used to add information to the tree from a database, as well as tailor the final graphic using Javascript and Stylesheets.

Further developer features can be switched on with the use of a preference file.

Using db on and extradata on as illustrated in the preferences section above will cause circular links to appear on nodes, and line based links on internal nodes with more than three members below.

The internal nodes are designed to send details of all leaf names below a selected node to a script. In the case of superfamily this is used to build a tree of these leaf nodes only.

Database access is used to assign another field to the tree nodes. In the case of SUPERFAMILY this is used to pass the NCBI taxonomy to the tree. Javascript is then used to make this information appear on rollover.

Standard links for the leaf nodes of a tree are available using the link command in the preference file. This sends the leaf name to the link specified.

We are happy to help customise and install TreeVector on your server. Please contact the author for more information.

Use on SUPERFAMILY

TreeVector can be used to plot protein domain architectures trees to display relationships between any set of fully sequenced genomes.
Click here for the SUPERFAMILY genome selector page.