MrBayes is a program for the Bayesian inference on phylogenies.
Version on CSC's Servers
Taito: 3.1.2, 3.2.3, 3.2.4, 3.2.7a
FGI grid: 3.2.1
To check available versions use:
module spider mrbayes
To check requirements for each version, use:
module spider mrbayes/3.2.7a
To use MrBayes in Taito cluster you first have to set up the correct compiler environment as indicated by module spider, e.g.:
module purge module load gcc/4.9.3 intelmpi/5.1.1
You can then load the MrBayes module.
module load mrbayes/3.2.7a
After loading the module, the serial (i.e. single processor) versio program starts with the command
There is also a serial version more suitable for interactive use (compiled with readline support) (not available for all version of MrBayes):
32 bit serial version (only available for version 3.1.2) starts with command:
Parallel version starts with the command:
When using the parallel version you should note that MrBayes assigns one chain to one core, so for optimal performance you should use as many cores as the total number of chains in your job. If you for example have specified nchains=4, nruns=2 you should use 8 cores (4*2).
Note that sometimes on particular data sets MrBayes v 3.1.2 summary commands (sump, sumt) crash the 64-bit program. If this happens, run the analysis (or just the summary) on 32 bit version.
MrBayes takes a character matrix, e.g., DNA sequence alignment, as an input only, if the file is in Nexus-format. Hint: You can save nexus-formatted alignments using, e.g. ClustalX (installed in Taito).
Running MrBayes analysis might take considerable amount of CPU time and memory. It is desirable to run it through the batch job system in Taito or in FGI.
To run a batch job you need to:
- Write a MrBayes command file (here "mb_com.nex")
- Write a batch job script (here "mb_batch")
- Make sure all your input files are in $WRKDIR (here "primates.nex")
- Submit your job into the queue
MrBayes command file should include the command you would type in MrBayes in interactive mode. This example runs the analysis in chapter 2 of the MrBayes 3.2 manual
begin mrbayes; set autoclose=yes nowarn=yes; execute primates.nex; lset nst=6 rates=invgamma; mcmc nchains=4 nruns=2 ngen=20000 samplefreq=100 printfreq=100 diagnfreq=1000; sump; sumt; end;
Example batch job script for Taito using 8 cores. (We are using 8 cores since our example uses Nchains=4, Nruns=2, so 4*2=8)
#!/bin/bash -l #SBATCH -J my_mrbjob #SBATCH -e my_mrbjob_err%j #SBATCH -o my_mrbjob_out%j #SBATCH --mem-per-cpu=4000 #SBATCH -t 01:00:00 #SBATCH -n 8 srun mb64par mb_com.nex >log.txt
To submit the job in Taito:
For tips on citations, you can run the
command in the program, which will give you a number of relevant citations for the program and its models and algorithms.
More information about MrBayes can be found from the MrBayes