MrBayes

Overview

MrBayes is a program for Bayesian inference and model choice across a wide range of phylogenetic and evolutionary models. It uses Markov chain Monte Carlo (MCMC) methods to estimate the posterior distribution of model parameters.

Version 3.2.6 is installed on the CSF.

Restrictions on use

There are no restrictions on access on the CSF – the software is made available under the GNU GPL v3 license. If you use this software in your research please cite it. Run the command citations in the software for further details.

Set up procedure

To access the software you must first load the most appropriate modulefile:

# Serial and Parallel (MPI) versions
apps/gcc/mrbayes/3.2.6

# Serial and Parallel (MPI) versions with Beagle for GPU support
apps/gcc/mrbayes/3.2.6-beagle

The beagle versions of the modulefiles load a version of MrBayes that has been compiled against the Beagle library. You run this version in the same way as all other versions but may see some speed-up depending on the features you used in MrBayes. Please consult the MrBayes manual for more information.

Running the application

Please do not run MrBayes on the login node. Jobs should be submitted to the compute nodes via batch.

We now recommend loading modulefiles within your jobscript so that you have a full record of how the job was run. See the example jobscript below for how to do this. Alternatively, you may load modulefiles on the login node and let the job inherit these settings.

Serial batch job submission

Create a batch submission script, for example:

#!/bin/bash --login
#$ -cwd             # Job will run from the current directory

## Load the required version
module load apps/gcc/mrbayes/3.2.6

mb myinput.nex

Submit the jobscript using:

qsub scriptname

where scriptname is the name of your jobscript.

Small Single-node Parallel batch job submission

The number of cores should be between 2 and 32. Note that the parallel version of the MrBayes executable is named

pmb

An example jobscript is:

#!/bin/bash --login
#$ -cwd             # Job will run from the current directory
#$ -pe smp.pe 16    # Single node parallel (up to 32 cores can be used)

# Load the required version
module load apps/gcc/mrbayes/3.2.6

# $NSLOTS is automatically set to the number of cores requested above
mpirun -n $NSLOTS pmb myinput.nex
                   #
                   #
                   # Note that the executable is now 'pmb' not 'mb'

Submit the jobscript using:

qsub scriptname

where scriptname is the name of your jobscript.

Interactive use for Development

MrBayes provides an interactive command-line which can be used for testing and developing your scripts. Please do not run MrBayes on the login node. Instead you should request an interactive session on a compute node as follows:

qrsh -l short
  #
  # Wait for an interactive session to start. If no resources
  # are free you will be asked to try again later.

# Now on the backend compute-node load the modulefile
module load apps/gcc/mrbayes/version

# Start the interactive shell
mb

# When you have finished with your interactive session, return to login node;
exit

Using the Beagle-enabled Version

A version of MrBayes that uses the Beagle library is also available. This will support GPU acceleration of some functions. To use this version, load the modulefile:

module load apps/gcc/mrbayes/3.2.6-beagle

The executables have the same names as before:

mb       # The serial version
pmb      # The parallel version

To run on a GPU node, if you have been granted access to these nodes, add the following to your jobscript:

#$ -l v100=1      # Can be 1 to 4 GPUs depending on your level of access

The MrBayes executables will automatically detect the GPU if running on a GPU node. To check this submit the following job:

#!/bin/bash --login
#$ -cwd
#$ -l v100=1
module load apps/gcc/mrbayes/3.2.6-beagle
echo Showbeagle | mb
       #
       # This is a MrBayes command to report info about the Beagle
       # library and features (such as GPU support).

Submit the jobscript using:

qsub scriptname

where scriptname is the name of your jobscript.

The output file will contain info about the GPU hardware.

Example Scripts

After loading one of the modulefiles, example scripts are available in the directory:

$MRBAYES_HOME/examples/

Further info

Updates

None.

Last modified on February 6, 2019 at 3:57 pm by George Leaver