Skip to content
This repository was archived by the owner on Jun 28, 2023. It is now read-only.

Color Map

Ryan Moore edited this page Sep 28, 2016 · 14 revisions

Making The Color Map File

The color map file is where the magic of Iroki happens! In this tutorial we will explain how to make and use color maps with Iroki.

File Format

The color map file is a plain text file with two or three tab-separated columns.

Any line in the file that begins with a # will be treated as a comment and ignored.

Examples

Each of the following examples will add color annotations to the following tree:

(s1,(s2,(s3,(s4,(s5,(s6,s7))))));

Note: The newick file is available for download here.

A Simple Example

In its simplest form, the color map has two columns name and color. The name refers to the label name of a leaf of the tree. The color can be specified as hex codes (e.g., #00FF00 for green) or as the name of a color. For a complete list of colors available to use in the color map file, see this page.

#Name Color
seq 1 red
seq 2 blue

In the above color map, the label and branch of the sequence named "seq 1" would be colored red, while the label and branch of the sequence named "seq 2" would be colored blue.

Note: In the above example, whether label only, branches only, or both labels and branches are colored depend on the command line options passed in to the Iroki program. See here for more details.

Lets run the command to add color to the tree file.

iroki -bte -c basic1.color_map -f basic.tre -o basic1.nex

This will output a Nexus file called basic1.nex, which looks like this when rendered in FigTree.

basic1.png

Clone this wiki locally