ExaBayes

Description

According to the page of ExaBayes, ExaBayes is a software package for Bayesian tree inference. It is particularly suitable for large-scale analyses on computer clusters.

Available Versions

  • exabayes/1.5 (default)

MPI Job Submission

submit_exabayes_mpi.sh
#!/bin/bash
#SBATCH -J exabayes_mpi
#SBATCH -N 4
#SBATCH --ntasks-per-node=28
#SBATCH -t 20-00:00:00
#SBATCH --mem-per-cpu=2G

export INPUT="alignment.phy config.nex"
export OUTPUT="*.out *.log"

module load exabayes

job-nanny mpirun -np $SLURM_NTASKS exabayes -f alignment.phy \
                 -m PROT -c config.nex -n 321 -s 123 -M 3 -S

Serial Job Submission

submit_exabayes_serial.sh
#!/bin/bash
#SBATCH -J exabayes_serial
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 20-00:00:00
#SBATCH --mem=8G

export INPUT="alignment.phy config.nex"
export OUTPUT="*.out *.log"

module load exabayes

job-nanny yggdrasil -f alignment.phy -m PROT -c config.nex \
                    -n 100 -s 123 -M 3 -S

Example Configuration File

config.nex
#nexus
begin mrbayes;
   set autoclose=yes nowarn=yes;
   lset nst=6 rates=invgamma;
   mcmcp ngen=1000000 samplefreq=100 printfreq=100;
   mcmc;
   sumt;
end;

Alignment File (PHYLIP)

alignment.phy
4 100
Seq1      ATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCG...
Seq2      ATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCG...
Seq3      ATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCG...
Seq4      ATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCG...

Important Options

ExaBayes Options

Option

Description

-f <file>

Alignment file

-m <model>

Substitution model (DNA, PROT, CODON)

-c <file>

Configuration file

-n <name>

Run name (used for output files)

-s <seed>

Random seed

-M <n>

Number of coupled MCMC chains

-S

Enable convergence diagnostics

Job Array for Multiple Runs

submit_exabayes_array.sh
#!/bin/bash
#SBATCH -J exabayes_array
#SBATCH --array=1-5
#SBATCH -N 2
#SBATCH --ntasks-per-node=28
#SBATCH -t 20-00:00:00
#SBATCH --mem-per-cpu=2G

export INPUT="alignment.phy config.nex"
export OUTPUT="run_${SLURM_ARRAY_TASK_ID}/"

module load exabayes

SEEDS=(123 456 789 101112 131415)
SEED=${SEEDS[$SLURM_ARRAY_TASK_ID-1]}

mkdir -p run_${SLURM_ARRAY_TASK_ID}
cd run_${SLURM_ARRAY_TASK_ID}
cp ../alignment.phy .
cp ../config.nex .

job-nanny mpirun -np $SLURM_NTASKS exabayes -f alignment.phy \
                 -m PROT -c config.nex -n run_${SLURM_ARRAY_TASK_ID} \
                 -s $SEED -M 3 -S

Results Analysis

After execution, use the ExaBayes package tools:

# Consolidate samples
cat *run_*.s* > all_samples

# Calculate burnin and consensus
consense -f all_samples -b 25

# Check convergence
tracecomp -x 1000 *run_*.s* > convergence.txt

References

See also