version 3.5c

CONSENSE -- Consensus tree program

(c) Copyright 1986-1993 by Joseph Felsenstein and by the University of Washington. Written by Joseph Felsenstein. Permission is granted to copy this document provided that no fee is charged for it and that this copyright notice is not removed.

CONSENSE reads a file of computer-readable trees and prints out (and may also write out onto a file) a consensus tree. At the moment it carries out a family of consensus tree methods called the Ml (M-sub-L) methods (Margush and McMorris, 1981). These include strict consensus and majority rule consensus. Basically the consensus tree consists of monophyletic groups that occur as often as possible in the data. If a group occurs in more than 50% of all the input trees it will definitely appear in the consensus tree.

The tree printed out has at each fork a number indicating how many times the group which consists of the species to the right of (descended from) the fork occurred. Thus if we read in 15 trees and find that a fork has the number 15, that group occurred in all of the trees. The strict consensus tree consists of all groups that occurred 100% of the time, the rest of the resolution being ignored. The tree printed out here includes groups down to 50%, and below it until the tree is fully resolved.

The majority rule consensus tree consists of all groups that occur more than 50% of the time. Any other percentage level between 50% and 100% can also be used, and that is why the program in effect carries out a family of methods. You have to decide on the percentage level, figure out for yourself what number of occurrences that would be (e.g. 15 in the above case for 100%), and resolutely ignore any group below that number. Do not use numbers at or below 50%, because some groups occurring (say) 35% of the time will not be shown on the tree. The collection of all groups that occur 35% or more of the time may include two groups that are mutually self contradictory and cannot appear in the same tree. In this program I have included groups that occur less than 50% of the time, working downwards in their frequency of occurrence, as long as they continue to resolve the tree and do not contradict more frequent groups. In this respect the method is similar to the Nelson consensus method (Nelson, 1979) as explicated by Page (1989) although it is not identical to it.

For the moment the program is rather crude; it cannot carry out any other consensus tree method, such as Adams consensus (Adams, 1972, 1986) or methods based on quadruples of species (Estabrook, McMorris, and Meacham, 1985).


Input is a tree file (called "infile" rather than "treefile") which contains a series of trees in the New Hampshire standard form -- the form used when many of the programs in this package write out tree files. Each tree starts on a new line. Each tree can have a weight, which is a real number and is located in comment brackets "[" and "]" just before the final ";" which ends the description of the tree. Note that this program can correctly read trees whether or not they are bifurcating: in fact they can be multifurcating atn any level in the tree.

The options are selected from a menu, which looks like this:

Majority-rule and strict consensus tree program, version 3.5c

Settings for this run:
  O                        Outgroup root?  No, use as outgroup species  1
  R        Trees to be treated as Rooted?  No
  0   Terminal type (IBM PC, VT52, ANSI)?  ANSI
  1         Print out the sets of species  Yes
  2  Print indications of progress of run  Yes
  3                        Print out tree  Yes
  4       Write out trees onto tree file?  Yes

Are these settings correct? (type Y or the letter for one to change)

Option R (Rooted) toggles between the default assumption that the input trees are unrooted trees and the selection that specifies that the tree is to be treated as a rooted tree and not re-rooted. Otherwise the tree will be treated as outgroup-rooted and will be re-rooted automatically at the first species encountered on the first tree (or at a species designated by the Outgroup option).

Option O is the usual Outgroup rooting option. It is in effect only if the Rooted option selection is not in effect. The trees will be re-rooted with a species of your choosing. You will be asked for the number of the species that is to be the outgroup. If we want to outgroup-root the tree on the line leading to a species which appears as the third species (counting left-to- right) in the first computer-readable tree in the input file, we would invoke select menu option O and specify species 3.

Output is a list of the species, a list of the subsets that appear in the consensus tree, a list of those that appeared in one or another of the individual trees but did not occur frequently enough to get into the consensus tree, followed by a diagram showing the consensus tree. The lists of subsets consists of a row of symbols, each either "." or "*". The species that are in the set are marked by "*". Every ten species there is a blank, to help you keep track of the alignment of columns. The order of symbols corresponds to the order of species in the species list. Thus a set that consisted of the second, seventh, and eighth out of 13 species would be represented by:

          .*....**.. ...
Note that if the trees are unrooted the final tree will have one group, consisting of every species except the Outgroup (which by default is the first species encountered on the first tree), which always appears. It will not be listed in either of the lists of sets, but it will be shown in the final tree as occurring all of the time. This is hardly surprising: in telling the program that this species is the outgroup we have specified that the set consisting of all of the others is always a monophyletic set. So this is not to be taken as interesting information, despite its dramatic appearance.

Option 2 in the menu gives you the option of turning off the writing of these sets into the output file.

Option 3 is the usual tree file option. If this is on (it is by default) then the final tree will be written out onto a file in computer-readable format. The number of times that each group appeared in the input trees will be written after each group. This number is the sum of the weights of the trees in which it appeared, so that if there are 11 trees, ten of them having weight 0.1 and one weight 1.0, a group that appeared in the last tree and in 6 others would be shown as appearing 1.6 times.


The constants available to be changed in the program include the usual initial settings for the terminal type ("ansi0", "vt520", and "ibmpc0") and "nmlngth", the length of a species name.

The program uses the consensus tree algorithm originally designed for the bootstrap programs. It is quite fast, and execution time is unlikely to be limiting for you (assembling the input file will be much more of a limiting step). In the future, if possible, more consensus tree methods will be incorporated (although the current methods are the ones needed for the component analysis of bootstrap estimates of phylogenies, and in other respects I also think that the present ones are probably among the best).

--------------------- TEST DATA SET ----------------------------------


--------------------- TEST SET OUTPUT --------------------------------

Majority-rule and strict consensus tree program, version 3.5c

Species in order:


Sets included in the consensus tree

Set (species in order)     How many times out of   9.00

Sets NOT included in consensus tree:

Set (species in order)     How many times out of   9.00

the numbers at the forks indicate the number
of times the group consisting of the species
which are to the right of that fork occurred
among the trees, out of   9.00 trees

  !         +-----------------------------E
  !         !
  !         !                        +----I
  !         !         +------------9.0
  !         !         !              +----F
  !    +--9.0         !
  !    !    !    +--2.0         +---------D
  !    !    !    !    !    +--6.0
  !    !    !    !    !    !    !    +----J
  !    !    !    !    +--6.0    +--4.0
  +--9.0    +--6.0         !         +----H
       !         !         !
       !         !         +--------------C
       !         !
       !         +------------------------G

  remember: this is an unrooted tree!