DensiTree How To’s

How do I move leafs?

This depends on the tree type. For default and centralised trees, first you select the leafs that you want to move. You can select leafs by clicking on them individually, or by dragging a rectangle over the set of leafs you want to select. By keeping the shift key pressed, the selection can be added to. By keeping the control key pressed, any leaf that is selected will be toggled from the selection. Once the appropriate set of leafs is selected, press M to move down and control-M to move in the other direction.

Furthermore, for star trees you can enable show clades. Circles appear on the taxa, which you can select by clicking on it, or drag a rectangle over it. The selection can be dragged. This allows you to position the taxa at irregular intervals.

I’m loading a large file, but nothing seem to happen?!?

If nothing happens after a few minutes, most likely it is java that has run out of memory. To start DensiTree with access to more memory, start it from the command line with

java -Xmx3g -jar DensiTree.jar

Here ‘3g’ means 3 gigabyte. If you need even more, change the 3 to a higher number.

How do I start DensiTree with my favorite settings?

First, find out the values of the current settings. This can be done using the Help/Help menu, which makes a dialog pop up that shows the current status. At the bottom, it also shows how to start up DensiTree with these settings from the command line.

How do I specify burn in?

Start DensiTree from the command line with the -b option, e.g. using java -jar DensiTree.jar -b 100

This will skip the first 100 trees every time a nexus tree is read. To check current burn in, select the Help/Help menu. The dialog shows the current state.

What does the color coding mean?

The most popular tree is blue, the next most popular red, the third most popular green and the rest is dark green.

Consensus trees are blue by default as are labels. Height bar and grid are black by default.

How do I change these colors?

Colors can be changed using the Settings/Set Color submenu. To start DensiTree with specific colors, colors can be specified from the command line or via a script as follows: java -Dcolor.1=0x000000 -jar DensiTree.jar sets the color of the most popular tree to black. The part ‘color.1’ specifies that it is the most popular color, and 0X000000 specifies the RGB value in hexadecimal.

The current color settings can be found using the Help/Help menu, where they are shown near the bottom of the dialog that pops up then.

The following colors can be specified that way: color.1 for most popular topology, color.2 for next most popular topology, color.3 for third most popular topology, color.default for remainder of topologies, color.cons for consensus trees, color.label for color of labels, color.height for color of height grid and height bar, for back ground color. color.rootcanal for root canal color.

So, to make consensus trees red and labels black, you start DensiTree like this: java -Dcolor.cons=0xFF0000 -Dcolor.label=0X000000 -jar DensiTree.jar

How do I change the label font?

Use the Settings/Set Font menu.

Can I batch process tree set files?

Use the command line options to specify your settings, and use the -o <filename>

option to specify a file. The DensiTree is exported in png format to the specified file.

For example,

densitree tree_set.trees -o image.png

might be used to produce a DensiTree summary image.png of the trees in tree_set.trees.

My tree is a mess, what do I do?

Check that you have a clock like tree. DensiTree may work for non-clock like trees, but was not designed to do so. Otherwise, try one of the tricks in the next question.

My tree has many crossing lines, what do I do?

o Step 1: Try the reshuffle using the Edit/Shuffle menu and try the various methods. Most methods work on some tree sets, but none work for all.

o Step 2: If the tree looks half decent, use the tree editor to rotate parts of the tree. You can show the tree editor using the Edit/Show Tree Edit menu. To rotate part of the tree, click on an icon at an internal node.

o Step 3: The location of internal nodes can be changed by dragging them with the right mouse button. This can help getting rid of some crossing branches.

How can I visualise meta data?

When there is meta data on the branches, such as populations sizes, branch rates or migration rates, DensiTree can be used in two ways to visualise this meta data.

1. By positioning all internal nodes at the height that the meta data value indicates. Press 7, 8 or 9 to get such a tree. The difference between the methods is that 7 shows the meta data values for each individual branch, 8 shows the mean meta data value at a particular height in the tree and 9 shows the sum of the meta data values.

2. By drawing lines with a width proportional to the meta data value.

How can I specify which meta data is used?

The simplest way is when you know in which order the metadata is inserted in the tree set file. Say, meta data is of the form

[&rate=0.1234,popsize={13.31, 11.01}]

then there are three numbers: one for rate, and two for popsize. To make the bottom of a branch equal to the rate, we need the first number. With menu settings/meta data/Bottom pattern number, a dialog pops up where you can enter ‘1’ for the rate, ‘2’ for the first popsize, and ‘3’ for the last pop size.

For experts, under menu settings/meta data/pattern, you can specify a regular expression that will be matched with the meta data in the tree file. This pattern will be used by both methods of meta data visualisation.

How can I specify which meta data is used for the bottom and top of a line?

With menu settings/meta data/Top pattern number, you can specify the number in the meta data. Note that the top of a branch need to be before the bottom of a branch.

Also, for experts, as in the previous question, but define two groups in the regular expression. The first group is used at the bottom of the branch and the second group at the top.

How do I create a phylogeographical DensiTree?

o Step 1: load a tree set file (Menu File/load)

o Step 2: load geographical locations (Menu File/Load geographic) encoded in a KML or KMZ file as produced in Google earth.

o Step 3: load a bitmap image (Menu File/Background image) with a world map. Alternatively, load a file of a map in Mercator projection which has the corners of the rectangle covered by the image encoded in its file name (see description of File/Background image for details).

The labels get all mixed up when the root is at the top. What do I do?

Rotate labels, using the Settings/Rotate labels menu. This only has an effect when the root is drawn at the top.

How do I export high res images for print publication

Zoom in and click the scroll bars to ensure the image is updated. Then, export as pdf using the File/Export menu (note: *not* the File/Save menu!). This ensures all text is exported in pdf format so that it is readable when zooming in. You might need to change the font size when zooming in.

Bayesian evolutionary analysis by sampling trees

Served through Jekyll, customised theme based on the twentyfourteen wordpress theme.