Skip to main content
v2026.11,986 entries · CC-BY 4.0

Phylogenetic Tree Parsimony: Method, Score and R Steps

How maximum parsimony picks the tree with the fewest changes, with a worked example and the phangorn R steps from pratchet to plotBS.

Written and maintained by CASRAI Editorial Board

Published

On this page

Phylogenetic tree parsimony (maximum parsimony) builds an evolutionary tree by choosing the tree that explains your aligned characters with the fewest changes. Each candidate tree gets a parsimony score, the minimum number of character changes needed to describe the data on that tree, and the best tree is the one with the lowest score. In R you can run it with the phangorn package (parsimony(), pratchet(), bab()), and in the PHYLIP package with the pars program.

This guide explains what the score counts, works one small example by hand, then runs the sequence from the phangorn documentation on its bundled primates alignment. It also covers how PHYLIP’s pars program frames the method and which search function to use for how many taxa. For the software-specific route in PAUP*, see the PAUP* guide; for a wider workflow that compares methods, see how to make a phylogenetic tree.

What phylogenetic tree parsimony is used for in research

Parsimony is a tree-search criterion for discrete characters: nucleotide or amino acid sites in an alignment, or morphological character states. The PHYLIP documentation describes its pars program as discrete-character parsimony using the Wagner method with multiple states (up to eight), where the criterion is the tree that requires the minimum number of changes. The Wagner method goes back to Eck and Dayhoff (1966) and Kluge and Farris (1969), as cited there.

Researchers use it for three things. First, as a stand-alone tree estimate that can be compared against distance and likelihood trees. Second, as a way to score any tree you already have: the phangorn documentation uses parsimony() to compare a UPGMA tree and a neighbour-joining tree on the same data. Third, as a source of starting trees: the phangorn vignette notes that UPGMA and neighbour-joining trees are used as starting points for maximum parsimony and maximum likelihood searches. If your goal is a likelihood tree, the RAxML guide and the IQ-TREE guide cover those programs.

How parsimony scores a tree

The score of a tree is a count. For every character (alignment column) the method finds the smallest number of state changes along the branches that reproduces the observed states at the tips, then adds those counts across all characters. The tree with the smallest total is preferred. PHYLIP’s pars keeps several trees when they tie for best, and the documentation says a branch is retained only if some character has a most parsimonious reconstruction that involves a change on it.

A four-taxon worked example

Take four taxa A, B, C and D and one two-state character with states A = 0, B = 0, C = 1, D = 1. There are three possible unrooted trees: (A,B | C,D), (A,C | B,D) and (A,D | B,C). On (A,B | C,D) a single change on the internal branch explains the data, so the score is 1. On (A,C | B,D) and on (A,D | B,C) the states 0 and 1 end up in the wrong pairs, so at least two changes are required and the score is 2. Parsimony therefore prefers (A,B | C,D). Real alignments have many columns, and a column only helps choose between trees when it separates the taxa in a way that differs between them. A column where every taxon has the same state scores the same on every tree.

The assumptions behind the method

The PHYLIP pars documentation lists these assumptions: the ancestral states are unknown; the characters evolve independently; different lineages evolve independently; changes among the states are equally probable; changes are a priori improbable over the time spans involved; and rates are low enough that two changes on a long segment are far less probable than one change on a short one. The same page notes the opposing view of Farris and Sober, who argue that parsimony does not rest on such substantive assumptions. Which view you take affects how you word the method in a paper, so state the criterion (minimum number of changes) rather than implying a model.

Install or access

Two openly documented routes are covered here. phangorn is an R package on CRAN whose reference manual describes it as estimating phylogenetic trees and networks with maximum likelihood, maximum parsimony and distance methods (Schliep 2011). Install it from within R and load it with ape, which the vignette also loads:

install.packages("phangorn")
library(ape)
library(phangorn)

PHYLIP is Joseph Felsenstein’s package of phylogeny programs, and its documentation, including the pars page, is hosted at phylipweb.github.io; the documentation notes the old site moved there on 31 August 2023. Both are cited in the Sources section below.

Step-by-step: run maximum parsimony in R with phangorn

The steps follow the phangorn “Trees” vignette and use its bundled primates alignment, so you can reproduce the scores shown. Scores that involve random starting trees can differ between runs, because the vignette sets no random seed.

  1. Load the alignment. The vignette reads the example file from the package’s extdata/trees folder: fdir = system.file("extdata/trees", package = "phangorn") and then primates = read.phyDat(file.path(fdir, "primates.dna"), format = "interleaved"). For your own data, use read.phyDat() with the format that matches your file.
  2. Build two reference trees. dm = dist.ml(primates), then treeUPGMA = upgma(dm) and treeNJ = NJ(dm).
  3. Score them. parsimony(treeUPGMA, primates) returns 751 and parsimony(treeNJ, primates) returns 746 in the vignette. Lower is better, so the neighbour-joining tree already explains the data with five fewer changes.
  4. Search for a better tree with the ratchet. treeRatchet = pratchet(primates, trace = 0, minit = 100). The vignette calls pratchet() the function most users want for inferring phylogenies by maximum parsimony. It implements the parsimony ratchet of Nixon (1999): it bootstraps the data, rearranges the current best tree on that bootstrap data set and saves the result, rearranges that saved tree on the original data and replaces the best tree if its score is lower, then iterates until minit iterations or until there has been no improvement for k iterations (default 10). trace = 0 silences the console output. Check the result with parsimony(treeRatchet, primates), which gives 746.
  5. Add branch lengths. Trees from the search have no branch lengths. treeRatchet = acctran(treeRatchet, primates) assigns them.
  6. Collapse zero-length edges. treeRatchet = di2multi(treeRatchet) removes internal edges whose length is at or below tol (default 1e-08), leaving multifurcations where the data do not support a split. If the search returned several trees (a multiPhylo object), keep the distinct ones with unique().
  7. Plot with support. The ratchet stores the bootstrap trees it visits, so plotBS(midpoint(treeRatchet), type = "phylogram") draws the tree with support values, and add.scale.bar() adds the scale bar.

Choosing a search function

The vignette separates exact and heuristic searches. bab() uses branch and bound (Hendy and Penny 1982) and finds all most parsimonious trees, but with more than about 10 taxa it can be slow and with 20 to 30 taxa it takes “almost forever”. The vignette example restricts the data to ten taxa: trees = bab(primates[1:10, ]). For larger data sets use pratchet(). If you want to control the search yourself, random.addition() makes a starting tree and optim.parsimony() improves it with nearest-neighbour interchange (NNI) or subtree pruning and regrafting (SPR; SPR is available only with the fitch algorithm). In the vignette, a random-addition tree scored 756 and one round of NNI brought it to 746. The data table below summarises these functions.

Run it in PHYLIP pars

PHYLIP programs are run on a data file and controlled through an options menu. For pars, the input is discrete characters, with the unknown state written as a question mark (?). The program handles both bifurcating and multifurcating trees, and its menu includes a V option that sets how many tied trees are kept. Read the pars documentation page for the current menu letters and input format before running it, because the menu is version-specific. The documentation at phylipweb.github.io describes version 3.69.

Output and how to read it

The main output is a tree plus its parsimony score. Read the score only relative to other trees on the same alignment: 746 versus 751 is meaningful, but a score from a different data set is not comparable, because the count depends on the number of characters and taxa. In R, parsimony() returns a number you can compare directly, and the vignette uses parsimony(c(treeRA, treeSPR), primates) to score two trees in one call (756 and 746).

Branch lengths after acctran() are counts of changes on that branch, not time or substitutions per site under a model. Multifurcations after di2multi() are not errors: they mark relationships the data do not resolve. When several trees tie for best, report that rather than picking one silently. To interpret the topology and support values you plot, see how to read a phylogenetic tree, and note that parsimony trees from pratchet() are unrooted until you root them, for example with midpoint() as in the vignette or with an outgroup (see rooting a phylogenetic tree).

Troubleshooting

The search runs for a very long time

You are probably using bab() on too many taxa. The vignette warns that it is slow beyond about 10 taxa. Switch to pratchet().

Scores differ between runs

Starting trees from random.addition() are random, and the vignette sets no seed. Set a seed with set.seed() before the call if you need identical results, and report the number of ratchet iterations (minit) you used.

The tree has no branch lengths

That is expected for trees returned by the search. Use acctran() to assign them before plotting or exporting.

The plot shows no support values

plotBS() uses the bootstrap trees the ratchet stored, so run pratchet() first and pass the result through plotBS(), as in the steps above.

SPR is not accepted

The vignette states that SPR rearrangements in optim.parsimony() work only with the fitch algorithm. Use NNI otherwise.

Other software that runs parsimony

Software How parsimony is run Where documented
phangorn (R) Functions parsimony(), pratchet(), bab(), optim.parsimony() CRAN vignette and reference manual
PHYLIP pars Discrete-character Wagner parsimony with multistate characters, options menu phylipweb.github.io documentation
PAUP* Parsimony search commands run from its command interface CASRAI PAUP* guide lists the commands

Licensing and cost differ by program and are not covered here; check each program’s own site.

Frequently asked questions

What is maximum parsimony in phylogenetics?

It is a tree-building criterion that prefers the tree needing the fewest character changes to explain the aligned data, as described in the PHYLIP pars documentation.

What does the parsimony score mean?

In phangorn it is the minimum number of changes necessary to describe the data for a given tree. Lower scores mean a better fit under the criterion, and scores are comparable only on the same data.

How does parsimony differ from maximum likelihood?

No. Parsimony counts changes and uses no substitution model in its criterion, whereas likelihood methods evaluate trees under an explicit model. phangorn supports both.

Which function should I use for a large data set?

pratchet(), which the phangorn vignette identifies as the function most users want, rather than bab(), which becomes slow beyond about 10 taxa.

Does parsimony assume a model of evolution?

PHYLIP’s documentation lists assumptions such as independent characters and low change rates, while noting that Farris and Sober argue parsimony makes no such substantive assumptions. Both positions are in the literature.

Sources

Data: phangorn parsimony search functions: purpose, limits and vignette example results

Compares the parsimony functions of the R package phangorn by what each does, its documented limitation and the example result reported in the package's Trees vignette on the primates alignment. Compiled from the vignette text only; scores involving random starting trees can vary between runs.

phangorn parsimony search functions: purpose, limits and vignette example results
FunctionWhat it doesDocumented limit or noteVignette example result
pratchet()Parsimony ratchet: bootstrap data, rearrange best tree, keep if lower score; repeat until minit iterations or no improvement for k (default 10) iterationsDescribed as the function most users want for maximum parsimonyPrimates example (minit = 100): score 746
bab()Branch and bound; finds all most parsimonious treesSlow above about 10 taxa; 20-30 taxa takes almost foreverPrimates first 10 taxa: 1 tree
optim.parsimony()Rearranges a given tree with NNI or SPRSPR only with the fitch algorithmRandom-addition tree 756 to 746 after 1 NNI
random.addition()Creates a starting tree by random additionResult varies between runs (no seed set in vignette)Primates example tree scored 756
parsimony()Returns the parsimony score of a given treeScore comparable only on the same dataUPGMA 751, NJ 746

Sources

Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Phylogenetic Tree Parsimony: Method, Score and R Steps

2 free questions a day, no account.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →