MrBayes on the Cluster


MrBayes 3.1 is installed on the cluster and is compiled to run in parallel. The MrBayes 3.1 manual can be downloaded here.

  • 1. Prepare your nexus data file. It is important that this file has UNIX line breaks (use TextWranger) and that this file has a ".nexus" extension. Note also that MrBayes does not support all of the characters recognized by PAUP - see page 10 of the MrBayes manual for details.

  • 2. Append a MrBayes block to your nexus file. An example is provided below. You may (must) want to change some of the parameter options to suit your specific needs (e.g., lset, ngen, burnin, nruns, nchains, filename) - read the MrBayes manual if you have a question about one of settings in the block. Running an analysis with this block will run three independent runs each using 4 chains.

    • BEGIN mrbayes;
      prset [place your model parameters here];
      lset [place your model parameters here];
      mcmcp nruns=3 ngen=10000000 printfreq=1000 samplefreq=500 nchains=4 savebrlens=yes filename=output_file;
      mcmc;
      sumt;
      sump;
      END;
  • If you want to remove the first 25% of the trees as burnin, add the following line to the MrBayes block:
  • relburnin = yes burninfrac = 0.25
  • This is also the default if you ask Mesquite to write a MrBayes block for you.

  • 3. Use sftp to upload your data file into an empty directory (use Fugu).

  • 4. Log on to the cluster and change into the directory with your nexus data file.

  • 5. To prepare for your run type "prepjobs.mrbayes".

  • 6. To run your job type "runjobs.mrbayes 1 1". By default MrBayes will use 4 processors. To use more processors type the number that you desire after the second 1. For example to use 12 processors, type "runjobs.mrbayes 1 1 12". If you typed this and used the above block in your data file, you would run three independent runs, each with 4 chains, and with each chain using using its own processor. Note that the number of chains must be at least as great as the number of processors. Also note that when running Bayes jobs on the cluster a run is seen as one job regardless of the number of processors being used. Normally one is automatically limited to 32 processors, but this can be exceeded when using MrBayes. Please be considerate and do not exceed 32 processors.

  • 7. Your .t and .p files for each run will be output into the same directory that contains your input nexus file. To check the status of a run type "tail ds1.out".
  • See the U.M.-St. Louis MrBayes page for further options on running MrBayes.