Characters and Character matrices
Characters and their character states are means by which to
describe the features of organisms. Mesquite supports characters
states are categorical (discrete and not necessarily
ordered) or continuous. Special versions of
categorical characters exist for DNA, RNA and protein sequence
data. For more details specific to those types of characters,
see the pages on molecular and continuous characters.
Characters can exist within matrices that are
stored in a data file. Thus, one matrix may store a series of
categorical characters to describe phenotypic features. A separate
matrix may store continous characters describing measurements
taken from the organisms, while a third matrix may store DNA sequence
data, in which each aligned site is treated as a character (Mesquite
does not currently handle fully unaligned data). Each matrix may
have only a single type of character, but a data file may contain
more than one matrix.
Characters can also exist outside of matrices. For instance,
characters may be created by simulations
and randomizations and used directly in calculations, without
at any point being captured in a matrix and stored in a file.
Creating a character matrix
There are several ways to create a
character matrix to be stored in the file. Most simply, you can
create a blank (empty) matrix by choosing Characters>New
Empty Matrix. In the dialog box that appears, name
the character matrix and specify the number of characters. You
will also need to choose the sort of data the matrix will contain
(standard categorical, DNA (or RNA) sequence data, continuous,
or protein sequence data). Normally, you will create an empty
matrix if you are about to start entering observations about organisms.
It is also possible to create character matrices that are already
filled with character states. For instance, if you want to make
a duplicate of an existing character matrix, select Characters>Make
New Matrix From>Stored Matrices. If you want to
create a matrix from the contents of the clipboard, select Characters>Make
New Matrix From>Clipboard. Other choices available
under Characters>Make New Matrix From>
allow you to make and store matrices resulting from simulations
of character evolution, randomizations of existing matrices, or
Character matrices can also be read from files, including those
in NEXUS and other formats that can be imported.
Deleting and renaming matrices
There are two places you can rename and delete character matrices:
in the List of Character Matrices window, and in the Projects
and Files window.
In the List of Character Matrices window (available in the Characters
menu), you can rename a matrix by editing its name directly. To
delete matrices, select the rows corresponding to the matrices
to be deleted, and select List>Delete Selected Character
To rename a matrix from the Projects and Files window, touch
on the "Character Matrix" box:
A drop-down menu will appear with the option to rename the matrix.
You can also use this drop-down menu to delete a matrix.
The Character Matrix Editor
Once you have a character matrix,
you may edit it using Mesquite's Character Matrix Editor,
at the top of the Characters menu. This is a spreadsheet editor,
similar in style to MacClade's. While the Mesquite editor
handle continuous data and has special utilities, for instance
to compare matrices, it lacks MacClade's sophisticated features
for viewing and alignment
of molecular sequence data. Because MacClade and Mesquite
share the NEXUS file format, for most data files you will
to edit matrices in either program to use in the other. Below
are instructions as to how to edit a character matrix. Most
the editing can be done in the Character Matrix Editor, but some
changes can be made in other windows.
Note that currently most changes you make to a character matrix
cannot be undone!
|The Character Matrix Editor showing morphological
|The Character Matrix Editor showing
Adding, deleting, renaming and sorting
taxa and characters
There are several methods for adding
taxa or characters to an existing matrix. To add taxa, either
choose (Character Matrix) Matrix>Add Taxa...
or (Taxa) List>Add Taxa... to
add taxa to the end of the matrix, or use the Add Taxa tool ()
in the character matrix to add taxa at the point in the matrix
that is touched. To add characters, either choose
(Character Matrix) Matrix>Add Characters... to add
characters to the end of the matrix, or use the Add Characters
in the character matrix to add characters at the point in the
matrix that is touched.
To delete existing taxa, either select
the taxa in the Taxa List Window (by touching on the taxon's number
at the far left), and choose (Taxa) List>Delete
Selected Taxa, or select the entire row for the taxa
to be deleted (by touching on the taxon's number at the far left)
in the Character Matrix and choose (Character
Matrix) Matrix>Delete Selected.
To delete existing characters, either
select the characters in the List of Characters Window (by touching
on the character's number at the far left), and choose (Characters)
List>Delete Selected Characters, or select the entire
row for the characters to be deleted (by touching on the characters's
number at the far left) in the Character Matrix and choose (Character
Matrix) Matrix>Delete Selected.
To rename taxa or characters, choose
the I-beam tool ()
in the Taxa List Window, List of Characters Window, or Character Matrix
Window, select the name to be edited, and type the new name.
To change the order of characters, you can select and drag entire
characters in the List of Characters Window or the Character
Matrix Editor. You can also us the sort tool () to sort characters
automatically in alphabetical or numerical order of the column
or row on which you touch in these windows.
Entering character data
You can enter character data either
one cell at a time, or using tools that allow entry of multiple
cells at once. Tools available are shown in the following table.
Selecting taxa, characters and cells
of the matrix
Mesquite has several tools for selecting
taxa, characters, or data cells, as described in the following
or multiple cells. To add or subtract cells to an existing
selection, hold down the Command (or Apple) key as you touch
on a cell. To extend a selection to encompass a solid block
of cells, hold down the Shift key as you touch on a cell.
||By default, selects
all cells possessing the same valued state as the cell touched.
That is, if you touch it on a cell with state "1",
all cells in the entire matrix with state "1" will
be selected. However, using the drop-down menu, you can ask
it to choose all cells with a value greater than that touched,
or less than. By default, this tool selects cells throughout
the entire matrix. Using the drop-down menu, you can ask to
to restrict the select to a single taxon, or a single character.
Holding down the Shift key will add the new cell to the existing
selection. Holding down the Command (or Apple) key will add
the new cells to the existing selection if you touch on a
cell that is not selected, and will remove the cells from
the existing selection if the cell is already selected.
||By default, selects
all taxa possessing the same state within the character touched
as that in the cell touched. However, using the drop-down
menu, you can ask it to choose all taxa with a value greater
than that touched, or less than. Holding down the Shift key
will add the new taxa to the existing selection. Holding down
the Command (or Apple) key will add the new taxa to the existing
selection if you touch on a taxon that is not selected, and
will remove the taxa from the existing selection if the taxon
is already selected.
||By default, selects
all characters possessing the same state within the character
touched as that in the cell touched. However, using the drop-down
menu, you can ask it to choose all characters with a value
greater than that touched, or less than. Holding down the
Shift key will add the new characters to the existing selection.
Holding down the Command (or Apple) key will add the new characters
to the existing selection if you touch on a character that
is not selected, and will remove the characters from the existing
selection if the character is already selected.
You can copy taxon and character names from one region of the
matrix to another and from one matrix to another. You can also
copy one or more cells in the matrix to the Clipboard, and paste
them into another region of the matrix, or into another matrix.
Mesquite allows you to do with discontinuous selections, as long
as the number of cells selected in the first taxon that is selected
while copying is the same as the number of cells selected in the
first taxon that is selected while pasting, and the same for subsequent
taxa. That is, if you select two cells in taxon 3, one cell in
taxon 5, and four cells in taxon 7, and copy this to the Clipboard,
then when you paste, you must select two cells in the first taxon
in which to paste, one in the next, and four in the last.
Mesquite will not let you paste a block of cells into the matrix
while you have selected a differently shaped block in the matrix.
However, if you attempt to do that, Mesquite will offer to change
the selection so that covers the same number of cells as in the
selection. You may then attempt again to paste.
Editing Names of Characters and States
Character names can be assigned either by editing the column
headings in the Character Matrix Editor, or by editing the character
names directly in the List of Characters window.
The State Names Editor, available by choosing (Character
Matrix) Matrix>Edit State Names, allows you to name
the states of categorical characters. It will not be available
if your matrix is specified as nucleotide or protein data.
Options for viewing the matrix
The Character Matrix Editor allows various display modes. Various display parameters may be set in the (Character
Matrix) Matrix>Display submenu. Cells
can be colored using the items in the (Character
Matrix) Matrix>Color Cells submenu. Cells can be
colored by their state, by whether or not a footnote is available,
and by other values calculated for each cell. This last facility,
"Color By Value", allows moving window analysis to visualize differing
GC content or amino acid properties. For instance, with DNA sequence
data, select (Character
Matrix) Matrix>Color Cells>Color By Value. The
cells will be colored blue if the site is G or C, white if A or
T. By selecting (Character
Matrix) Matrix>Moving Window (for colors)..., you
can set the size of the moving window over which GC content is
Alterations and Transformations
The following are available in the Alter/Transform menu of
the Matrix menu to modify the cells of a matrix:
- Filling selected cells with a specified state: Choose (Character
- Filling selected cells with random states with equal frequency
for all states: Choose (Character
Matrix) Matrix>Alter/Transform>Random Fill
- Randomly reshuffle the states within a character among the
selected taxa: Choose (Character
Matrix) Matrix>Alter/Transform>Other Choices...>Shuffle
states among taxa
- For nucleotide sequence data, convert the entries in each
cell into their complement: Choose (Character
Matrix) Matrix>Alter/Transform>Other Choices...>Nucleotide
- Reversing a selected molecular sequence: Choose (Character
Matrix) Matrix>Alter/Transform>Other Choices...>Reverse
Changing attributes of a characters
A character, in addition to having states assigned in each of
the terminal taxa, may also have other attributes. For instance,
a character is marked as included or excluded, and it has assumptions
attributed to it, such as a weight and a parsimony model of evolution.
These attributes are used in various calculations. They may be
assigned in the List of Characters windows, available in the Characters
In the List of Characters window, columns refer to inclusion,
parsimony model and probability model (for likelihood calculations).
Other columns can be requested for Group Membership, Weight, and
(for DNA data) Codon Position. For each of these columns, the
assigned attribute can be changed by first either selecting the
characters to be changed (if only some characters are to be altered)
or selecting the attribute's column (if all characters are to
be altered). Then, by touching the name of the column (where an
inverted black triangle should appear), a drop down menu appears
that allows you to make the appropriate specification.
For each of the attributes other than group membership, the bottom
three menu items are to store to the file the current specification
as a named specification set (like saving a typeset or weightset
in MacClade), to replace an existing specification set with the
current one, or to load a stored specification set to become the
The following are the options specific to each column:
- Inclusion - Include, Exclude, and Reverse allow you to change
character inclusion. Reverse changes excluded to included
vice versa. Characters that are excluded don't participate
in treelength and many other calculations. Exclusion is not
universally respected by the calculations, for some calculations
use even characters that are excluded.
- Parsimony model - The Model submenu allows you to select a
parsimony model to assign to the characters, for use in parsimony
- Probability model - The Model submenu allows you to select
a probability model to assign to the characters, for use in
likelihood calculations and simulations.
- Group Membership - The image above shows
Group Membership in the last column. To assign characters
to groups, you must first create groups using New Group. For
instance, you could create a group Adult Characters and another
group Larval Characters. Then, you can assign character to
the group using the Set Group submenu. You can also edit the
of the group, and rename the group. The group color is useful
to distinguish characters of different groups, for instance
in charts or in the Character Matrix editor.
- Weight - With the Set weight menu item you can set the weight
assigned to the character. This is used currently on in treelength
- Codon Positions — This column is available for DNA data.
The drop down menu allows you to assign positions.
Charting information about Characters
Informative statistics and values for characters can be viewed
or charted in various windows. In the Analysis menu a Histogram
can be requested to show the distribution of a value for a series
of characters. For instance, the number of parsimony steps in
the characters on a current tree can be charted. The Scattergram
available in the Analysis menu plots characters in a two dimensional
space with the X axis being one particular value (e.g., the character's
likelhood under one tree), the Y axis another value (e.g. the
character's likelihood under a different tree). Values for characters
can also be viewed in the List of Characters
window, where columns can be added (in the List menu) to show
selected statistics for each of the characters.