All Data Structures Files Functions Variables Macros Pages


SHIBA can best be seen as an experimental ‘sandbox’ to explore likelihoods of hypotheses about lineage movement. Varying parameter values and historical area details can then be used to assess the sensitivity of ones biogeographic conclusions.

Input data

To run SHIBA you will need:

See Input File Format for more details on encoding your input data.

Speciation-distribution model

SHIBA uses a simple model to determine the spatial distribution of daughter lineages that maximizes allopatric speciation. When, at the transition of one period to the next, a lineage splitting occurs (as specified by the input phylogeny):

Hence, with two daughter lineages and two areas, the outcome will be simple allopatry. With two daughter lineages and one area, the outcome will be simple sympatry. With two daughter lineages and three areas, the outcome will be one area with one daughter lineage and two areas with the other daughter lineage, indicating that the ancestral species grew in spatial distribution, perhaps with little evolutionary change, while the population in one area underwent divergence and allopatry. Et cetera...

See Pseudocode for more details of the biogeographical algorithm.

Island Biogeography features

Both the size of an ancestral area and its degree of isolation from other areas will strongly influence the likelihood that an ancestral taxon distribution included it or not. To incorporate these data, SHIBA contains a basic Island Biogeography model, with functions similar to those proposed in the classic MacArthur and Wilson model: extinction of a lineage on an island is inversely related to its area, while dispersal probability into and out of an island is inversely related to its isolation.

Please see Island Biogeography functions for more details on the functions.

Basic tutorial

  1. Please see Installation and Usage first.
  2. Please examine the ascii-graphic at the top of the sample file in Input File Format. The example contains three areas. The ‘middle area,’ AreaB, begins by being attached to AreaA, moves away from A and ends by being attached to AreaC. The example also contains two phylogenies, the first having branching events early (when A and B are close), the second having branching events later (when B and C are close)
  3. Run SHIBA with the first phylogeny: shiba -l -p 0 (the -l option give the input data printout). Look at the distribution of Lineage 0 and Lineage 2 (marked with a ‘*’ in the ascii-graphic).
  4. Now run SHIBA with the second phylogeny: shiba -p 1. Look again at the distribution of the Lineage 0 and 2.
  5. In both phylogenies, the root of the tree was in AreaA and AreaB, almost never in AreaC, indicating that the whole started on the ‘left’ (A, B in the image) and was ‘carried across’ to the ‘right’ (B, C). It was too unlikely that it started in C but that Sp1 went extinct in C and dispersed to A.
  6. In the first phylogeny, the majority of the runs have Lineage 2 in AreaA and/or AreaB, while in the second, this lineage only occurs in AreaB. The implication is that with much time to go, this lineage could have been widespread and then died out in A, but with little time to go Sp1 and Sp2+Sp3 must have undergone a vicariant split prior at 20 Mya.
  7. By changing the survival and dispersal curves (with -d or -s on the command line, or in the shibaInput.xml file), our confidence in these interpretations can be further strengthened.


SHIBA use a ‘brute-force’ approach to finding successful solutions, running each simulation until the present and then comparing observed and simulated distributions. This is very inefficient, in terms of the number of solutions found relative to the number of runs initiated. The code has been parallelized using pthreads to make use of all the cores of a multi-core CPU. Nevertheless, with large trees and/or large space-time grids, the program may take several hours to run. By directing the output to another file, and using nohup, the program can be left to run on powerful servers:

  $ nohup shiba > out 

We are working to optimize the code further and to incorporate alternative search heuristics.

Further reading

Please see Webb & Ree (2012) for more details.