Difference between revisions of "MrBayes"

From UFRC
Jump to navigation Jump to search
 
(21 intermediate revisions by 5 users not shown)
Line 1: Line 1:
__NOTOC__
+
[[Category:Phylogenetics]]
__NOEDITSECTION__
+
{|<!--CONFIGURATION: REQUIRED-->
[[Category:Software]][[Category:Phylogenetics]]
 
<!-- ########  Template Configuration ######## -->
 
<!--Edit definitions of the variables used in template calls
 
Required variables:
 
app - lowercase name of the application e.g. "amber"
 
url - url of the software page (project, company product, etc) - e.g. "http://ambermd.org/"
 
Optional variables:
 
INTEL - Version of the Intel Compiler e.g. "11.1"
 
MPI - MPI Implementation and version e.g. "openmpi/1.3.4"
 
-->
 
{|
 
<!--Main settings - REQUIRED-->
 
 
|{{#vardefine:app|mrbayes}}
 
|{{#vardefine:app|mrbayes}}
|{{#vardefine:url|http://mrbayes.sourceforge.net/}}
+
|{{#vardefine:url|http://nbisweden.github.io/MrBayes}}
<!--Compiler and MPI settings - OPTIONAL -->
+
<!--CONFIGURATION: OPTIONAL (|1}} means it's ON)-->
|{{#vardefine:intel|11.1}} <!-- E.g. "11.1" -->
+
|{{#vardefine:conf|}}           <!--CONFIGURATION-->
|{{#vardefine:mpi|openmpi/1.4.3}} <!-- E.g. "openmpi/1.3.4" -->
+
|{{#vardefine:exe|1}}           <!--ADDITIONAL INFO-->
<!--Choose sections to enable - OPTIONAL-->
+
|{{#vardefine:job|}}           <!--JOB SCRIPTS-->
|{{#vardefine:mod|1}} <!--Present instructions for running the software with modules -->
+
|{{#vardefine:policy|}}         <!--POLICY-->
|{{#vardefine:exe|}} <!--Present manual instructions for running the software -->
+
|{{#vardefine:testing|}}       <!--PROFILING-->
|{{#vardefine:conf|}} <!--Enable config wiki page link - {{#vardefine:conf|1}} = ON/conf|}} = OFF-->
+
|{{#vardefine:faq|}}             <!--FAQ-->
|{{#vardefine:pbs|1}} <!--Enable PBS script wiki page link-->
+
|{{#vardefine:citation|}}       <!--CITATION-->
|{{#vardefine:policy|}} <!--Enable policy section -->
+
|{{#vardefine:installation|}} <!--INSTALLATION-->
|{{#vardefine:testing|}} <!--Enable performance testing/profiling section -->
 
|{{#vardefine:faq|}} <!--Enable FAQ section -->
 
|{{#vardefine:citation|}} <!--Enable Reference/Citation section -->
 
 
|}
 
|}
<!-- ########  Template Body ######## -->
+
<!--BODY-->
 
<!--Description-->
 
<!--Description-->
 
{{#if: {{#var: url}}|
 
{{#if: {{#var: url}}|
{{App_Description|app={{#var:app}}|url={{#var:url}}}}|}}
+
{{App_Description|app={{#var:app}}|url={{#var:url}}|name={{#var:app}}}}|}}
 +
 
 
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.
 
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.
  
<!--Location-->
+
<!--Modules-->
{{App_Location|app={{#var:app}}|{{#var:ver}}}}
+
==Environment Modules==
<!--Versions-->
+
Run <code>module spider {{#var:app}}</code> to find out what environment modules are available for this application.
==Available versions==
+
==System Variables==
* 3.1.2
+
* HPC_{{uc:{{#var:app}}}}_DIR - installation directory
* 3.2.1
+
<!--Configuration-->
<!-- -->
 
==Running the application using modules==
 
 
 
Multiple versions of MrBayes are installed in /apps/mrbayes/, and can be used through loading different sets of module files.
 
 
 
For information about the MrBayes module options, run the module spider command:
 
$module spider mrbayes/3.2.1
 
or
 
$module spider mrbayes/3.1.2
 
 
 
'''MrBayes 3.2.1 versions are compiled with Intel 11.1, while MrBayes 3.1.2 versions are compiled with Intel 10.1.''' In either case, you will need to load the Intel module first.
 
 
 
 
 
For the serial (single core) version load MrBayes:
 
$module load intel/11.1 mrbayes
 
 
 
The recommended MPI version is the OpenMPI 1.4.3 compiled version. To use this load:
 
$module load intel/11.1 openmpi/1.4.3 mrbayes
 
 
 
For MrBayes 3.1.2, we also have an MPI version compiled with MVAPICH/0.9.9
 
$module load intel/10.1 mvapich/0.9.9 mrbayes
 
 
 
{{#if: {{#var: exe}}|==How To Run==
 
WRITE INSTRUCTIONS ON RUNNING THE ACTUAL BINARY|}}
 
 
{{#if: {{#var: conf}}|==Configuration==
 
{{#if: {{#var: conf}}|==Configuration==
See the [[{{PAGENAME}}_Configuration]] page for {{#var: app}} configuration details.|}}
+
See the [[{{PAGENAME}}_Configuration]] page for {{#var: app}} configuration details.
{{#if: {{#var: pbs}}|==PBS Script Examples==|}}
+
|}}
 +
<!--Run-->
 +
{{#if: {{#var: exe}}|==Additional Information==
  
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).
+
;For MPI jobs:
 +
* As a rule of thumb ntasks should be set to the total number of chains (MrBayes default is 4 chains * 2 runs = 8 chains)
  
{{#fileAnchor: mrbayes.MPI.pbs}}
+
* As long as the number of cores is under 12, it is best to use a single node ("SBATCH --nodes=1") where nodes are physical computers as that will keep all communication within a single node.
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 where the job was launched from
+
|}}
cd $PBS_O_WORKDIR
+
<!--Job Scripts-->
 +
{{#if: {{#var: job}}|==Job Script Examples==
 +
See the [[{{PAGENAME}}_Job_Scripts]] page for {{#var: app}} Job script examples.
 +
|}}
 +
<!--Policy-->
 +
{{#if: {{#var: policy}}|==Usage Policy==
  
#Use modules to load the environment for MrBayes
+
WRITE USAGE POLICY HERE (Licensing, usage, access).
module load intel/11.1
 
module load openmpi/1.4.3
 
module load mrbayes
 
  
# Define number of processors
+
|}}
NPROCS=`wc -l < $PBS_NODEFILE`
+
<!--Performance-->
 +
{{#if: {{#var: testing}}|==Performance==
  
IbEnabled=`/usr/local/sbin/IbEnabled`
+
WRITE_PERFORMANCE_TESTING_RESULTS_HERE
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 This job has allocated $NPROCS nodes
+
|}}
echo $MPIRUN -np $NPROCS mb my_nexus.nex
+
<!--Faq-->
 
 
#Run MrBayes using the command line from documentation.
 
$MPIRUN -np $NPROCS mb my_nexus.nex
 
 
 
</source>
 
 
 
 
 
 
 
'''Script for serial (single core) MrBayes job:'''
 
{{#fileAnchor: mrbayes.serial.pbs}}
 
Download raw source of the [{{#fileLink: mrbayes.serial.pbs}} mrbayes.serial.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=1
 
#PBS -l pmem=500mb
 
#PBS -l walltime=01:00:00
 
#
 
 
 
#Change to the directory where the job was launched from
 
cd $PBS_O_WORKDIR
 
 
 
#Use modules to load the environment for MrBayes
 
module load intel/11.1
 
module load mrbayes
 
 
 
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==
 
{{#if: {{#var: faq}}|==FAQ==
 
*'''Q:''' **'''A:'''|}}
 
*'''Q:''' **'''A:'''|}}
 +
<!--Citation-->
 
{{#if: {{#var: citation}}|==Citation==
 
{{#if: {{#var: citation}}|==Citation==
If you publish research that uses {{{app}}} you have to cite it as follows:
+
If you publish research that uses {{#var:app}} you have to cite it as follows:
WRITE CITATION HERE
+
 
 +
WRITE_CITATION_HERE
 +
 
 
|}}
 
|}}
 +
<!--Installation-->
 +
{{#if: {{#var: installation}}|==Installation==
 +
See the [[{{PAGENAME}}_Install]] page for {{#var: app}} installation notes.|}}
 +
<!--Turn the Table of Contents and Edit paragraph links ON/OFF-->
 +
__NOTOC____NOEDITSECTION__

Latest revision as of 15:03, 11 April 2022

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.

Environment Modules

Run module spider mrbayes to find out what environment modules are available for this application.

System Variables

  • HPC_MRBAYES_DIR - installation directory

Additional Information

For MPI jobs
  • As a rule of thumb ntasks should be set to the total number of chains (MrBayes default is 4 chains * 2 runs = 8 chains)
  • As long as the number of cores is under 12, it is best to use a single node ("SBATCH --nodes=1") where nodes are physical computers as that will keep all communication within a single node.