Short Tutorial: Running BEAST on Rockfish

BEAST (Bayesian Evolutionary Analysis Sampling Trees) is a powerful tool for phylogenetic analysis using Bayesian inference. Widely used in evolutionary biology and related fields, BEAST enables researchers to analyze molecular sequences, estimate divergence times, and test evolutionary hypotheses.

This tutorial provides step-by-step instructions for downloading and running BEAST on Rockfish. Whether you’re using BEAST’s graphical user interface (GUI) via the Open OnDemand portal or executing commands directly in a terminal, this guide will help you set up and run BEAST efficiently for your research needs.

If you’re unfamiliar with Rockfish or using an HPC system, consider reviewing the Navigating Rockfish training session before proceeding.

Let’s dive in!

Downloading BEAST

To use BEAST on Rockfish, you’ll first need to download and unpack the software.

1. Open a Terminal on your computer and login into Rockfish:

				
					 $ ssh YourUserID@login.rockfish.jhu.edu
				
			

2. Download BEAST 10.5:

				
					 $ wget https://github.com/beast-dev/beast-mcmc/releases/download/v10.5.0-beta5/BEAST_X_v10.5.0-beta5.tgz
				
			

3.Unpack the compressed file:

				
					$ tar -zxvf BEAST_X_v10.5.0-beta5.tgz
				
			

Running BEAST from Open OnDemand (with GUI)

BEAST’s graphical user interface (GUI) tools, “BEAUti” and “BEAST,” allow you to prepare datasets and run analyses interactively. This section explains how to use these tools on Rockfish via the Open OnDemand portal.

  1. Open your Internet browser and go to the Open OnDemand Portal. Log in using your Rockfish credentials.
  2. Click on the “Desktop” app, select the resources you need (e.g., partition, time, number of cores), and click on Launch. Wait for your session to be ready and then click on Launch Desktop.

Allocating more resources than necessary can lead to inefficiency; only request what your workload requires.

3. Inside the Desktop app, click on the Terminal Emulator icon located in the bottom center of the window.

4. In the Terminal Emulator, load the dependencies for running BEAST:

  • For CPUs (skip this part if you are running from a GPU node):

				
					$ tar -zxvf BEAST_X_v10.5.0-beta5.tgz
				
			
  • For GPUs (skip this part if you are NOT running from a GPU node):

				
					$ module reset
     $ module load GCC/12.3.0
     $ module load beagle-lib/4.0.1-GCC-12.3.0-CUDA-12.1.1
				
			

Ensure that you have started the “Desktop” session on a GPU partition if you plan to use GPU resources. If not, you’ll need to load the modules for running BEAST on CPUs instead.

5. Move to the folder containing the BEAST binaries:

				
					$ cd BEASTv10.5.0/bin/
				
			

6. Open the GUI for “BEAUti” or “BEAST” by running:6. Open the GUI for “BEAUti” or “BEAST” by running:%MCEPASTEBIN%

				
					 $ ./beauti
    $ ./beast
				
			

Use `./beauti` to set up and prepare your input file before running `./beast`.

Running BEAST from the Command Line (without GUI)

For advanced users or automated workflows, BEAST can be run directly from the command line. This section guides you through connecting to a compute node, setting up the environment, and running BEAST non-interactively.

1. Connect to a compute node with the desired resources:

				
					   $ interact -p shared -n 6 -t 02:00:00
				
			

 – `-p`: Partition
– `-n`: Number of cores
– `-t`: Maximum time of use (hours:minutes:seconds)

Select a partition that matches your workload requirements. If using a GPU partition, make sure to include your GPU account with the -a option in the command.

  • For CPUs (skip this step if you are running from a GPU node):
				
					    $ module reset
     $ module load GCC/11.3.0
     $ module load beagle-lib/4.0.0-GCC-11.3.0
				
			
  • For GPUs (skip this step if you are NOT running from a GPU node):
				
					     $ module reset
     $ module load GCC/12.3.0
     $ module load beagle-lib/4.0.1-GCC-12.3.0-CUDA-12.1.1
				
			

3. Move to the directory containing BEAST libs:

				
					    $ java -jar beauti.jar /path/to/your/file.fasta
				
			

4. Run BEAST:

				
					 $ java -jar beast.jar -seed 1234 /path/to/your/file.xml
				
			

If running from a GPU node, add the flag -beagle_GPU to the command above.

Always test your input file with a small dataset before running on a large cluster to ensure everything is configured correctly.