MrBayes
Version
V. 3.1.2 and 3.2.0 installed on HIPPU
V. 3.1.2 and 3.2.0 installed on MURSKA
V. 3.1.2 and 3.2.0 installed on VUORI
Note on versions:
Version 3.2.0 is the latest official stable release. there has been considerable re-write of code since 3.1.2. It is still rather new and may still contain bugs.
Version 3.1.2. is rather old and the code has some incompatibility problems with 64 bit systems. On particular data sets the summary commands (sump, sumt) crash
the 64-bit program. We recommend running the 32 bit version (mb32). You can also run the analysis with 64 bit version and just run the summary commands using the 32 bit version.
Description
MrBayes is a program for the Bayesian inference on phylogenies.
Usage
On all machines MrBayes needs to be initialized before use. This is done with command
module load mrbayes
Version 3.2.0 is loaded by default, but you can specify the version required (use command "module avail" to see available versions):
module load mrbayes/3.1.2
After loading the module, the program starts with the command
mb64
32 bit version (only available for version 3.1.2) starts with command
mb32
Parallel version starts with the command (only available in Murska and Vuori)
mb64parWhen 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 Hippu).
Batch jobs
Running MrBayes analysis might take considerable amount of CPU time and memory. It is desirable to run it through the batch job system.
To run a batch job you need to:
- Write a MrBayes command file (here "mb_com")
- 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
set autoclose=yes nowarn=yes
execute primates.nex
lset nst=6 rates=invgamma
mcmc ngen=20000 samplefreq=100 printfreq=100 diagnfreq=1000
sump
sumt
quit
Example Batch job script for Murska (using single core)
#!/bin/csh
#BSUB -L /bin/csh
#BSUB -e mrb1M_err_%J
#BSUB -o mrb1M_out_%J
#BSUB -M 4194304
#BSUB -W 05:00
#BSUB -n 1
module load mrbayes
mb64 <mb_com >log.txt
Example batch job script for Vuori using 8 cores. (We are using 8 cores since our example uses Nchains=4, Nruns=2, so 4*2=8)
#!/bin/tcsh
#SBATCH -J my_mrbjob
#SBATCH -e my_mrbjob_err%j
#SBATCH -o my_mrbjob_out%j
#SBATCH --mem-per-cpu=4000
#SBATCH -t 00:05:00
#SBATCH -n 8
#SBATCH -p parallel
module load mrbayes
srun mb64par <mb_com >log.txt
To submit the job in Murska:
bsub < mb_batch.
To submit the job in Vuori
sbatch mb_batch
Note that all the data files and the batch job file need to be in the $WRKDIR, since computational nodes do not see the $HOME or $METAWRK directories.
Manual
A detailed description of MrBayes commands is found in the manual.
You might also want to read the worked-out examples in Molecular systematics - material for practicals.
Distribution
MrBayes can be downloaded from it's website.
User support
| Saren Ari-Matti | +358 9 457 2282 | Ari-Matti.Saren at csc.fi |