Phylogenetic Analysis Using Maximum Likelihood with MUSCLE + trimAl + RAxML-ng-mpi
TL;DR
Protein-based phylogenetic analysis is a well-known and important method for studying gene function and evolution. A commonly used workflow for constructing phylogenetic trees is as follows:
- Multiple Alignment
- Removal of non-conserved sequences (optional)
- Phylogenetic tree construction
Common methods for constructing phylogenetic trees include maximum parsimony, distance matrix methods, maximum likelihood, Bayesian methods, and more recently, the Graph Splitting method. The most widely used methods are maximum likelihood and Bayesian inference. Well-known software includes PhyML and RAxML for maximum likelihood, and MrBayes for Bayesian methods. In this post, we will use RAxML to perform phylogenetic analysis using the maximum likelihood method.
Workflow
1. Multiple Alignment by MUSCLE
Download the binary from the official website and use it. Since the default settings reportedly provide the best accuracy (reference), we created the alignment with default parameters. The .afa extension stands for "alignment FASTA" and was adopted because it is used on the MUSCLE website.
muscle -in seqs.fa -out seqs.afa
2. Removal of Non-conserved Sequences (trimAl)
Clone from GitHub and build with make. A Dockerfile was created as follows:
According to the manual, using trimal -in seqs.afa -out seqs_trim.afa -automated1 is recommended for maximum likelihood analysis.
3. Phylogenetic Analysis with RAxML-ng
A newer version of RAxML called RAxML-ng has been recently released, so we used it. The Dockerfile was created as follows. Since we wanted to use MPI, we downloaded and used raxml-ng-mpi. It can be found around the README on GitHub.
raxml-ng-mpi --msa seqs_trim.afa --all --model LG+G+I --bs-trees 100 --threads 8
- --msa: alignment file
- --all: ML search + bootstrapping
- --model: there are many options in the manual, but LG was chosen for this analysis.
- +G (discrete GAMMA with 4 categories, mean category rates, ML estimate of alpha)
- +I (ML estimate)
- --bs-trees: number of bootstrap replicates
The best tree with bootstrap support values is saved in the file with the .support extension (in this case, seqs_trim.afa.support).
Reference
Edgar, R.C. (2004) MUSCLE: multiple sequence alignment with high accuracy and high throughput Nucleic Acids Res. 32(5):1792-1797
trimAl: a tool for automated alignment trimming in large-scale phylogenetic analyses Salvador Capella-Gutiérrez, José M. Silla-Martínez and Toni Gabaldón∗ Bioinformatics. 2009 Aug 1;25(15):1972-3.
Alexey M. Kozlov, Diego Darriba, Tomáš Flouri, Benoit Morel, and Alexandros Stamatakis (2019) RAxML-NG: A fast, scalable, and user-friendly tool for maximum likelihood phylogenetic inference. Bioinformatics, btz305 doi:10.1093/bioinformatics/btz305