7. Managing TREEMAP files


This section describes the file formats used by TREEMAP, and how you can create your own data files.

7.1 Kinds of files


Macintosh

On the Macintosh, TREEMAP creates three kinds of files: TREEMAP data files, PICT files, and text files. These files have the following icons:

Documents



PICT files



TEXT files



PICT files are standard Macintosh picture files, which can be edited by graphics programs, or copied/pasted into a word processor. Text files are used to store text output, and have their creator set to TeachText so you can quickly view their contents using that program.

Windows

Under Windows, TREEMAP data files are standard ASCII text files with the default extension *.NEX, and picture files are Windows metafiles (*.WMF). The later can be read by virtually all Windows graphics programs and word processors.

7.2 Opening an existing data file


TREEMAP data files use a variant of the NEXUS format (the details of which are presented later in this manual). To read a TREEMAP file choose the Open command from the File menu. You will be presented with a standard File Open dialog box that lists the available files. The program comes with several example data files for you to examine.

TREEMAP also supports drag-and-drop opening of files.

Tree information

If your input file contains output comments you can view these using the Host information and Parasite information commands on the View menu.

7..3 Creating a new TREEMAP file


If you have trees for the hosts and parasites (e.g., produced by a phylogenetic tree building program such as PAUP or PHYLIP) then you can create a new TREEMAP file using the File | New command. To do this you must have the following two files:

Fully resolved, rooted trees for the hosts in either NEXUS (e.g. PAUP 3.0 or later, MacClade 3.0) or PHYLIP format.

Fully resolved, rooted trees for the parasites in either NEXUS or PHYLIP format. Every parasite must have a host.

The New command displays the following dialog box.

Fig. 7 The New Project dialog box.

To load your tree files click on the Get host tree(s)... and Get parasite tree(s)... buttons. If the trees are successfully loaded the name of the file will be displayed to the right of the corresponding button. Once you have both sets of trees you can click on the Edit associations... button which displays the following dialog:

Fig. 8 Edit Associations dialog box.

The dialog displays a list of all host taxa, together with two lists of parasites: those that are on the currently selected host, and those that are not. You can move parasites between the two lists by double clicking on one or more parasite names.


Not every host taxa requires a parasite, but every parasite requires a host. Your changes to the host-parasite associations will not be accepted unless this last requirement is satisfied.


Once you've entered the host-parasite associations, click on OK and TREEMAP will display the trees and associations.

7.4 Editing an existing TREEMAP file


You can edit the host-parasite associations using the Edit | Associations command. This displays the same dialog box as described in the previous section.

7.5 Importing and exporting COMPONENT 2.0 files


The file formats used by TREEMAP and COMPONENT (Page, 1993) are incompatible. However, TREEMAP can read and write COMPONENT files. To read a COMPONENT file choose Import from the File menu. A dialog box will appear prompting you for the file name.

Should you wish to export a TREEMAP file for use by COMPONENT (for example, to edit the trees or compute a reconciled tree) choose the Export command. Note that any reconstructions you have created cannot be saved to COMPONENT files.


TREEMAP expects the COMPONENT file to contain a only single DISTRIBUTION block describing the parasite's host distribution and relationships. Multiple DISTRIBUTION blocks are not allowed.


An advantage of using COMPONENT files is that they can be easily created using COMPONENT's text and tree editors. A disadvantage is that COMPONENT is currently only available for Windows PC's.

7.6 Exporting files for Brooks Parsimony Analysis


Brooks parsimony analysis (BPA; Brooks and McLennan, 1991) is another method for exploring the relationship between host and parasite phylogeny. It consists of coding the parasite cladogram as a suite of binary characters which are then analysed using parsimony. You can either use a tree building program to find the most parsimonious host tree based on the parasite phylogeny, or you can optimise the coded parasite phylogeny onto a known host phylogeny (similar to what TREEMAP does). Elsewhere (Page, 1990; 1994) I have been critical of BPA; in particular I have argued that the reconstructions it produces may be spurious. However, I have provided the facility to export files for BPA so that you can explore this issue for yourself.

TREEMAP creates a NEXUS format file that can be read by PAUP 3.1 (Swofford, 1993) and MacClade 3.0 (Maddison and Maddison, 1992). The current parasite tree displayed in the Tanglegram window is additive binary coded using "inclusive ORing" (O'Grady and Deets, 1987), and the host tree (or trees) is written to a TREES block. The binary characters are labelled with either the name of the corresponding terminal parasite taxon or the number displayed when you choose View | Internal labels in the Tanglegram window.

Macintosh

On the Macintosh the exported file has its creator set to 'CLAD' so that Finder displays the MacClade icon (shown below). Double clicking on the file will load it into MacClade.

MacClade document



7.7 TREEMAP file format


TREEMAP uses a variant of the NEXUS format to describe the host and parasite trees, the host-parasite associations, and the reconstructions. Extensions to the NEXUS forma are currently being developed (David Maddison, pers. comm.) that will enable me to replace the current format with a more portable format. In the meantime, TREEMAP has its own file format. Here is a simple example:

#nexus

begin host;
     tree host=(a,(b,c));
endblock;

begin parasite;
     tree parasite = ((I,II),III);
endblock;

begin distribution;
     range
          I : a,
         II : b,
        III : c;
endblock;

Each file must contain HOST, PARASITE, and DISTRIBUTION blocks in that order. The HOST and PARASITE blocks describe the host and parasite phylogenies. You can either enter the trees directly (as above) or use the IMPORT command, e.g.

begin host;
     import filetype=NEXUS file ='\develop\cpwcpp\gophers.tre';
endblock;

This example imports a PAUP tree file called GOPHERS.TRE (you can also import PHYLIP files).

Macintosh

The import command will only work if the file being imported is in the same folder as the data file. The file= field should contain just the name of the file, without any path information.

Windows

The file being imported can reside in any directory, and the file= command can contain full path information.

Tree descriptions in the HOST and PARASITE blocks must contain the labels for the host and parasite taxa; e.g., in the example given above, the host tree is described as (a,(b,c)), not (1,(2,3)). If you are importing PAUP or PHYLIP files, TREEMAP automatically obtains the labels from the imported tree file.


TREEMAP requires binary (i.e., fully resolved) rooted trees for both the hosts and parasites. Including non binary trees will cause the program to issue an error message and stop reading your data file.


You can have up to 100 host and parasite trees, each with up to 100 taxa.


If you create one or more reconstructions the file saved by TREEMAP will contain a RECONSTRUCTIONS block describing each reconstruction. Do not attempt to edit this block.


7.8 Creating a data file from scratch


At present TREEMAP has no file editing facilities, so you will need to use a text editor.

Macintosh

Use a text editor such as TeachText or BBEdit.

Windows

Use a text editor such as Windows Notepad or the editor provided by COMPONENT.

If you use a word processor be sure to save your file as a text file.

7.9 Saving files


The Save command saves any modifications you have made to the original file. The Save as command lets you save the trees (and any reconstructions) to a new file.