High-Performance Computing at the NIH
GitHub YouTube @nih_hpc RSS Feed
FastTree on Biowulf & Helix

FastTree infers approximately-maximum-likelihood phylogenetic trees from alignments of nucleotide or protein sequences. FastTree can handle alignments with up to a million of sequences in a reasonable amount of time and memory. For large alignments, FastTree is 100-1,000 times faster than PhyML 3.0 or RAxML 7.

FastTree is open-source software developed by Price et al. [FastTree paper]

On Helix

Type 'module load FastTree' to set up your environment, and then 'FastTree'.

To use the multi-threaded version, run 'FastTreeMP' after loading the module. The module is set up to run a max of 4 threads on Helix. Do not use more than 4 threads (4 CPUs) on Helix.

Batch job on Biowulf

Set up a batch script along the following lines:


module load FastTree


FastTreeMP alignmentfile   treefile

Submit this script with:

sbatch --cpus-per-task=8  jobscript

The command above allocates 8 CPUs for the job. Within the batch script, the variable $SLURM_CPUS_PER_TASK is used to set the number of threads that FastTreeMP spawns. The number of threads should always be the same as the number of allocated CPUs, and you make sure of this by using $SLURM_CPUS_PER_TASK within the script.

If you need more than the default 4 GB of memory, add --mem=8g to the sbatch command line.

Swarm of jobs on Biowulf

Set up a swarm command file along the following lines:

export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK; FastTreeMP  alignment1 > tree1
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK; FastTreeMP  alignment2 > tree2
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK; FastTreeMP  alignment3 > tree3
Submit with:
swarm -t 4 -f swarmfile --module FastTree
If each FastTreeMP run requires more than the default 1.5 GB of memory allocated by swarm, add -g # to the swarm command line, where # represents the number of GB of memory required for a single FastTree run.

Interactive job on Biowulf

Sample session:

[susanc@biowulf ~]$ sinteractive
salloc.exe: Granted job allocation 1085038
salloc.exe: Waiting for resource configuration
salloc.exe: Nodes cn0039 are ready for job
[susanc@cn0039 ~]$ module load FastTree
[susanc@cn0039 ~]$ FastTreeMP  alignmentfile  > treefile
[susanc@cn0039 ~]$ exit
salloc.exe: Relinquishing job allocation 1085038
salloc.exe: Job allocation 1085038 has been revoked.
[susanc@biowulf ~]$

FastTree documentation