Difference between revisions of "MrBayes"

From UFRC
Jump to navigation Jump to search
m (Text replacement - "#uppercase" to "uc")
 
(29 intermediate revisions by 6 users not shown)
Line 1: Line 1:
MrBayes has been installed on the cluster. We currently have two different versions installed:
+
__NOTOC__
 +
__NOEDITSECTION__
 +
[[Category:Software]][[Category:Phylogenetics]]
 +
{|<!--Main settings - REQUIRED-->
 +
|{{#vardefine:app|mrbayes}}
 +
|{{#vardefine:url|http://mrbayes.sourceforge.net/}}
 +
|{{#vardefine:exe|}} <!--Present manual instructions for running the software -->
 +
|{{#vardefine:conf|}} <!--Enable config wiki page link - {{#vardefine:conf|1}} = ON/conf|}} = OFF-->
 +
|{{#vardefine:pbs|}} <!--Enable PBS script wiki page link-->
 +
|{{#vardefine:policy|}} <!--Enable policy section -->
 +
|{{#vardefine:testing|}} <!--Enable performance testing/profiling section -->
 +
|{{#vardefine:faq|}} <!--Enable FAQ section -->
 +
|{{#vardefine:citation|}} <!--Enable Reference/Citation section -->
 +
|}
 +
<!-- ########  Template Body ######## -->
 +
<!--Description-->
 +
{{#if: {{#var: url}}|
 +
{{App_Description|app={{#var:app}}|url={{#var:url}}|name={{#var:app}}}}|}}
  
/apps/mrbayes/bin/mb-mpi  <- Parallel Version
+
MrBayes is a program for Bayesian inference and model choice across a wide range of phylogenetic and evolutionary models. MrBayes uses Markov chain Monte Carlo (MCMC) methods to estimate the posterior distribution of model parameters.
/apps/mrbayes/bin/mb      <- Single processor version
 
  
==Website==
+
In addition to the official MrBayes distribution, a modified version that uses the Gamma-Dirichlet and Inverse Gamma-Dirichlet priors for branch lengths (Rannala et al. in press; Zhang et al. 2012). This also includes the two exponential priors on internal and external branch lengths described by Yang & Rannala (2005) and Yang (2007). Please see [http://abacus.gene.ucl.ac.uk/software.html Ziheng Yang's site] for more information and citations. The modified version is only installed for openmpi and is called mb_Dirichlet. To run this version, simply replace mb with mb_Dirichlet in the examples below.
[http://mrbayes.scs.fsu.edu/ MrBayes Home Website]
+
 
==Sample PBS Script==
+
<!--Modules-->
<pre>
+
==Required Modules==
#!/bin/sh
+
[[Modules|modules documentation]]
#PBS -N mbtest
+
===Serial===
#PBS -m bea
+
*{{#var:app}}
#PBS -M <EMAIL ADDRESS>
+
===Parallel (OpenMP)===
#PBS -o pbsJobLog
+
*intel
#PBS -e pbsJobErr
+
*{{#var:app}}
#PBS -l nodes=4:ppn=1:infiniband
+
===Parallel (OpenMPI)===
#PBS -l pmem=2400mb
+
*intel
#PBS -l walltime=5:00:00
+
*openmpi
 +
*{{#var:app}}
 +
==System Variables==
 +
* HPC_{{uc:{{#var:app}}}}_DIR - installation directory
 +
<!--Additional-->
 +
{{#if: {{#var: exe}}|==Additional Information==
 +
WRITE INSTRUCTIONS ON RUNNING THE ACTUAL BINARY|}}
 +
{{#if: {{#var: conf}}|==Configuration==
 +
See the [[{{PAGENAME}}_Configuration]] page for {{#var: app}} configuration details.|}}
 +
{{#if: {{#var: pbs}}|==PBS Script Examples==|}}
 +
For MPI jobs: Remember that the total number of cores cannot be greater than the total number of chains MrBayes is using. For example, if you have 2 runs, each with 4 chains, the maximum number of cores to request is 2*4=8 cores. As long as the number of cores is under 12, it is best to keep nodes=1 (nodes = physical machines) as that will keep all communication within a single node. If you need more than 12 cores, you will probably want to add :infiniband to the request. (e.g. nodes=4:ppn=8:infiniband).
 +
 
 +
<!--
 +
{{#fileAnchor: mrbayes.MPI.pbs}}
 +
Download raw source of the [{{#fileLink: mrbayes.MPI.pbs}} mrbayes.MPI.pbs]
 +
<source lang=bash>
 +
#!/bin/bash
 +
#
 +
#PBS -N mrbayes
 +
#PBS -M <your e-mail>
 +
#PBS -m abe
 +
#PBS -o mb.$PBS_JOBID.out
 +
#PBS -e mb.$PBS_JOBID.err
 +
#PBS -l nodes=1:ppn=8
 +
#PBS -l pmem=500mb
 +
#PBS -l walltime=01:00:00
 +
#
 +
# Change to the directory from which the job was submitted
 
#
 
#
# This job's working directory
 
echo Working directory is $PBS_O_WORKDIR
 
 
cd $PBS_O_WORKDIR
 
cd $PBS_O_WORKDIR
 +
#
 +
# Use modules to configure your environment for mrbayes
 +
#
 +
module load intel
 +
module load openmpi
 +
module load mrbayes
 +
#
 +
# Run MrBayes using the command line from documentation.
 +
#
 +
mpiexec mb my_nexus.nex
 +
</source>
  
echo Running on host `hostname`
 
echo Time is `date`
 
echo Directory is `pwd`
 
echo This jobs runs on the following processors:
 
echo `cat $PBS_NODEFILE`
 
# Define number of processors
 
NPROCS=`wc -l < $PBS_NODEFILE`
 
  
IbEnabled=`/usr/local/sbin/IbEnabled`
 
if [ $IbEnabled -gt 0 ]; then
 
  echo "Running on IB-enabled node set"
 
  MPIRUN="mpirun --mca btl openib"
 
else
 
  echo "Running on GigE-enabled node set"
 
  MPIRUN="mpirun --mca btl ^udapl,openib --mca btl_tcp_if_include eth0"
 
fi
 
echo MPIRUN = $MPIRUN
 
  
echo This job has allocated $NPROCS nodes
+
'''Script for serial (single core) MrBayes job:'''
echo $MPIRUN -np $NPROCS /apps/mrbayes/bin/mb-mpi indel_all_mb.dat \> log.txt
+
{{#fileAnchor: mrbayes.serial.pbs}}
$MPIRUN -np $NPROCS /apps/mrbayes/mb-mpi indel_all_mb.dat > log.txt
+
Download raw source of the [{{#fileLink: mrbayes.serial.pbs}} mrbayes.serial.pbs]
</pre>
+
<source lang=bash>
 +
#!/bin/bash
 +
#
 +
#PBS -N mrbayes
 +
#PBS -M <your e-mail>
 +
#PBS -m abe
 +
#PBS -o mb.$PBS_JOBID.out
 +
#PBS -e mb.$PBS_JOBID.err
 +
#PBS -l nodes=1:ppn=1
 +
#PBS -l pmem=500mb
 +
#PBS -l walltime=01:00:00
 +
#
 +
# Change to the directory from which the job was submitted
 +
#
 +
cd $PBS_O_WORKDIR
 +
#
 +
# Use modules to configure your environment for mrbayes
 +
#
 +
module load mrbayes
 +
#
 +
# launch the executable
 +
#
 +
mb my_nexus.nex
 +
</source>
 +
-->
 +
{{#if: {{#var: policy}}|==Usage Policy==
 +
WRITE USAGE POLICY HERE (perhaps templates for a couple of main licensing schemes can be used)|}}
 +
{{#if: {{#var: testing}}|==Performance==
 +
WRITE PERFORMANCE TESTING RESULTS HERE|}}
 +
{{#if: {{#var: faq}}|==FAQ==
 +
*'''Q:''' **'''A:'''|}}
 +
{{#if: {{#var: citation}}|==Citation==
 +
If you publish research that uses {{{app}}} you have to cite it as follows:
 +
WRITE CITATION HERE
 +
|}}

Latest revision as of 21:23, 6 December 2019

Description

mrbayes website  

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

In addition to the official MrBayes distribution, a modified version that uses the Gamma-Dirichlet and Inverse Gamma-Dirichlet priors for branch lengths (Rannala et al. in press; Zhang et al. 2012). This also includes the two exponential priors on internal and external branch lengths described by Yang & Rannala (2005) and Yang (2007). Please see Ziheng Yang's site for more information and citations. The modified version is only installed for openmpi and is called mb_Dirichlet. To run this version, simply replace mb with mb_Dirichlet in the examples below.

Required Modules

modules documentation

Serial

  • mrbayes

Parallel (OpenMP)

  • intel
  • mrbayes

Parallel (OpenMPI)

  • intel
  • openmpi
  • mrbayes

System Variables

  • HPC_MRBAYES_DIR - installation directory


For MPI jobs: Remember that the total number of cores cannot be greater than the total number of chains MrBayes is using. For example, if you have 2 runs, each with 4 chains, the maximum number of cores to request is 2*4=8 cores. As long as the number of cores is under 12, it is best to keep nodes=1 (nodes = physical machines) as that will keep all communication within a single node. If you need more than 12 cores, you will probably want to add :infiniband to the request. (e.g. nodes=4:ppn=8:infiniband).