Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
RAxML (Randomized Axelerated Maximum Likelihood) is an open-source bioinformatics software package designed for large-scale phylogenetic tree inference under the maximum likelihood optimality criterion. Developed by Alexandros Stamatakis and the Exelixis Lab, RAxML and its modern successor RAxML-NG evaluate multiple sequence alignments of nucleotides or amino acids to reconstruct robust evolutionary trees using high-performance heuristics, vector intrinsics, and rapid bootstrapping algorithms.
What it is used for in research
Phylogenetic inference is a fundamental methodology across evolutionary biology, molecular systematics, epidemiology, and comparative genomics. Researchers seek to reconstruct the branching histories of organisms, genes, or pathogens from observed molecular sequence data. Among statistical frameworks for phylogenetic reconstruction, maximum likelihood (ML)—introduced to molecular phylogenetics by Joseph Felsenstein in 1981—evaluates the probability of observing a given multiple sequence alignment (MSA) conditional on a candidate tree topology, branch lengths, and a continuous-time Markov substitution model.
While maximum likelihood offers robust statistical properties and resilience against systematic artifacts such as long-branch attraction, finding the optimal tree is an NP-hard problem. The number of possible unrooted bifurcating topologies grows super-exponentially with the number of taxa; for an alignment of 50 taxa, the tree search space encompasses more than 10^74 distinct topologies. RAxML addresses this computational bottleneck through greedy tree-search heuristics based on Subtree Pruning and Regrafting (SPR) moves combined with numerical optimization routines, enabling researchers to infer rigorous evolutionary hypotheses from datasets comprising thousands of taxa and millions of base pairs.
In contemporary research practice, RAxML is deployed across multiple specialized domains:
- Phylogenomics and Species Tree Estimation: Reconstructing deep evolutionary radiations across plants, animals, fungi, and microbes using multi-locus concatenated alignments or whole-genome orthologous gene sets.
- Pathogen Phylodynamics and Molecular Epidemiology: Tracking transmission dynamics, divergence times, and variant emergence of viral and bacterial epidemics during public health surveillance.
- Environmental Metagenomics: Placing environmental sequence reads onto reference taxonomic trees using evolutionary placement algorithms to characterize uncultivated microbial communities.
- Gene Family Evolution: Distinguishing orthologous speciation events from gene duplication, horizontal gene transfer, and lineage-specific loss across comparative eukaryotic genomes.
While classic RAxML v8 dominated phylogenetic computing for over a decade, its authors developed RAxML-NG as a ground-up C++ re-implementation to resolve architectural limitations of the legacy codebase. RAxML-NG provides improved numerical precision for branch-length optimization, streamlined handling of missing data, automated thread scaling, support for the Transfer Bootstrap Expectation (TBE) metric on large trees, and systematic detection of phylogenetic terraces—topological regions where multi-gene alignments with non-overlapping missing data produce identical likelihood scores. Whether researchers are working on standard gene alignments or complex genomic supermatrices, understanding the software foundations ensures rigorous, publishable phylogenies that complement broader methods used to make a phylogenetic tree.
How to install or access it
Acquiring RAxML and RAxML-NG must always be done through verified official repositories, package managers, or academic computing portals. The software is released under open-source licensing: classic RAxML v8 is licensed under the GNU General Public License v3 (GPLv3), whereas RAxML-NG is distributed under the GNU Affero General Public License v3 (AGPLv3), governed by standard open-source license principles that permit free academic, non-commercial, and commercial execution, inspection, and modification.
Package Managers: Conda and Bioconda
For most Linux and macOS workstations, the most direct and reproducible installation method is via the Bioconda channel using Conda or Mamba. Bioconda packages precompiled binaries with all necessary linear algebra and vectorization dependencies.
To install the modern RAxML-NG binary into an isolated environment:
# Create and activate a dedicated bioinformatics environment
conda create -n phylo -c conda-forge -c bioconda raxml-ng
conda activate phylo
# Verify installation and display compilation architecture
raxml-ng --version
If your analysis specifically requires the legacy RAxML v8 executable (for historical pipeline compatibility or legacy script integration):
# Install classic RAxML v8
conda install -c bioconda raxml
# Verify v8 executable availability
raxmlHPC-PTHREADS -v
Compiling from Source on Linux and macOS
Compiling from source code ensures that the binaries exploit specific SIMD (Single Instruction, Multiple Data) vector instruction sets available on your local CPU architecture, including SSE3, AVX2, or AVX-512. Vector extensions dramatically accelerate core phylogenetic likelihood calculations.
For RAxML-NG, source compilation utilizes CMake and a C++11 compliant compiler:
# Clone official repository recursively with submodules
git clone --recursive https://github.com/amkozlov/raxml-ng.git
cd raxml-ng
mkdir build
cd build
cmake ..
make -j4
For classic RAxML v8, the source repository contains preconfigured Makefiles tailored to specific vector extensions and threading models:
git clone https://github.com/stamatak/standard-RAxML.git
cd standard-RAxML
make -f Makefile.AVX2.PTHREADS.gcc
sudo cp raxmlHPC-PTHREADS-AVX2 /usr/local/bin/
Web Portals and High-Performance Cyberinfrastructure
Phylogenomic supermatrices comprising hundreds of taxa and hundreds of thousands of positions often exceed the memory capacity and execution time permissible on standard desktop hardware. Researchers without direct access to university high-performance computing (HPC) clusters can utilize publicly funded research cyberinfrastructure:
- CIPRES Science Gateway: Hosted by the San Diego Supercomputer Center (SDSC), CIPRES provides a web portal and REST API to run parallelized RAxML v8 and RAxML-NG jobs on national supercomputing clusters without local cluster administration.
- Galaxy Project: The international Galaxy web platform hosts standardized RAxML and RAxML-NG tool wrappers, allowing researchers to incorporate tree inference directly into reproducible graphical workflows.
Step-by-step task
Reconstructing a maximum likelihood tree requires a disciplined sequence of data validation, model selection, parameter configuration, tree searching, and bootstrap support assessment. The following step-by-step walkthrough outlines an end-to-end analysis using the official syntax of modern RAxML-NG, accompanied by the corresponding classic RAxML v8 commands.
Step 1: Validate Multiple Sequence Alignment and Compress Patterns
Prior to initiating computational tree searches, verify that your multiple sequence alignment contains no syntax errors, illegal character states, or entirely empty sequences. RAxML-NG includes a dedicated sanity check that validates the alignment and reports the number of unique site patterns:
raxml-ng --check --msa primate_genes.phy --model GTR+G
If the alignment passes validation, compress the alignment into an optimized binary format (RBA) to accelerate subsequent tree search rounds:
raxml-ng --parse --msa primate_genes.phy --model GTR+G --prefix primates_data
Step 2: Define Partition Schemes for Multi-Gene Datasets
When analyzing concatenated multi-gene alignments or protein-coding sequences with codon-specific rate variation, each genomic region should evolve under distinct evolutionary parameters. Create a partition text file (e.g., partitions.txt) defining data models and nucleotide coordinate boundaries:
# RAxML-NG partition file format
GTR+G, gene1 = 1-1200
GTR+I+G, gene2 = 1201-2550
LG+G, protein_region = 2551-3800
Step 3: Determine Optimal Core Allocation and Memory Budget
Efficiency in parallel phylogenetic analysis depends on aligning thread count with data dimensions. A standard heuristic across Exelixis Lab documentation recommends allocating approximately one CPU core for every 1,000 to 2,000 unique alignment patterns. Allocating excessive threads to small alignments results in synchronization overhead and degraded performance.
Step 4: Execute Best-Scoring ML Tree Search and Bootstrapping
In modern RAxML-NG, the –all flag performs an integrated workflow: it conducts multiple tree searches starting from randomized and parsimony trees to escape local optima, executes non-parametric bootstrapping, and maps support values onto the best-scoring topology:
raxml-ng --all --msa primate_genes.phy --model partitions.txt --prefix primates_ml --threads 8 --seed 42 --bs-trees 200
Key parameters in this command include:
--all: Executes tree inference and bootstrap replicate generation in a single command.--msa: Specifies the input multiple sequence alignment in PHYLIP, FASTA, or binary RBA format.--model: Specifies the evolutionary model string or path to the partition file.--prefix: Defines the naming string prefixed to all generated output files.--threads: Allocates 8 CPU cores for POSIX thread parallelization.--seed: Explicit random seed for starting tree generation and replicate sampling to guarantee reproducibility.--bs-trees 200: Specifies 200 non-parametric bootstrap replicates (or use –bs-trees autoMRE for automatic bootstrap convergence testing).
Step 5: Legacy Syntax for Classic RAxML v8
If using classic RAxML v8 in existing laboratory pipelines, the rapid bootstrap and best-scoring tree search are executed using the -f a command flag:
raxmlHPC-PTHREADS-AVX2 -f a -x 12345 -p 67890 -# 100 -m GTRGAMMA -s primate_genes.phy -q partitions.txt -n primates_v8 -T 8
In this classic syntax, -x provides the random seed for rapid bootstrapping, -p specifies the parsimony starting tree seed, -# sets replicate count, -q indicates the partition file, -n provides the run suffix, and -T sets thread count.
Step 6: Assess Branch Support via FBP or Transfer Bootstrap Expectation
For datasets containing hundreds of taxa, traditional Felsenstein Bootstrap Proportions (FBP) often yield low support values for deep nodes due to small taxon-placement fluctuations. RAxML-NG allows researchers to compute the Transfer Bootstrap Expectation (TBE) metric, which measures gradual branch stability:
raxml-ng --support --tree primates_ml.raxml.bestTree --bs-trees primates_ml.raxml.bootstraps --prefix primates_tbe --bs-metric TBE
Output and how to read it
Understanding the structure and mathematical meaning of RAxML output files is essential for interpreting phylogenetic hypotheses and preparing figures for peer-reviewed publication. Both RAxML v8 and RAxML-NG generate standardized output files containing topologies, parameter estimations, and runtime logs.
RAxML-NG Output Files
When running RAxML-NG with a designated prefix (e.g., –prefix analysis_run), the program produces the following distinct files:
- analysis_run.raxml.bestTree: The single best-scoring maximum likelihood tree topology identified across all independent searches, formatted in standard Newick notation. Branch lengths represent expected substitutions per site.
- analysis_run.raxml.support: The best-scoring ML tree topology with bootstrap support values annotated at internal nodes. By default, values represent percentages (0 to 100) under FBP or proportions (0.0 to 1.0) under TBE.
- analysis_run.raxml.bootstraps: A multi-tree Newick file containing the collection of individual bootstrap replicate trees inferred during the resampled search phases.
- analysis_run.raxml.bestModel: Optimized substitution model parameters, including base frequencies, rate matrix exchangeability coefficients, and the alpha shape parameter of the Gamma distribution for rate heterogeneity.
- analysis_run.raxml.log: Comprehensive execution log documenting final log-likelihood scores (-ln L), search trajectory details, memory allocation, convergence assessments, and elapsed execution time.
Classic RAxML v8 Output Naming Conventions
Classic RAxML v8 appends the run identifier specified by the -n flag to fixed file prefixes:
- RAxML_bestTree.run_id: The optimal ML tree without support values.
- RAxML_bipartitions.run_id: The best ML tree with bootstrap support values mapped onto node labels. This is the primary file imported into tree visualization packages.
- RAxML_bootstrap.run_id: All bootstrap replicate trees concatenated into one file.
- RAxML_info.run_id: Runtime parameters, partition-specific parameter estimations, and final tree likelihood scores.
Reading Tree Topologies and Visualizing Results
To inspect and render the resulting trees, import the support tree file (.raxml.support or RAxML_bipartitions.run_id) into specialized phylogenetic visualization programs:
- FigTree: An interactive desktop viewer allowing users to display branch lengths, turn on node support labels, root trees using designated outgroups, and export publication-ready vector graphics.
- Interactive Tree of Life (iTOL): A comprehensive online visualization tool supporting complex metadata annotations, domain architectures, and geographic distribution overlays.
- Dendroscope: Specifically designed to handle large-scale phylogenetic trees and networks comprising tens of thousands of taxa.
When reporting results, ensure that data archives follow FAIR data principles by depositing alignment files, partition specifications, command scripts, and Newick tree outputs into public repositories like Zenodo, Dryad, or TreeBASE.
Troubleshooting
Phylogenetic tree inference under maximum likelihood involves complex non-linear optimization across discrete topological space and continuous parameter space. Researchers frequently encounter specific operational errors or analytical anomalies. The following diagnostics address common failure modes.
1. Entirely Undetermined or Duplicate Taxa
Symptom: RAxML halts with an error stating that a sequence contains only gap characters or missing data (e.g., ERROR: Sequence ‘Taxon_X’ contains only missing data), or warns about identical sequences.
Diagnostic and Fix: Maximum likelihood algorithms cannot compute likelihood values for taxa consisting entirely of ambiguous or missing positions (‘N’, ‘?’, or ‘-‘). Inspect the alignment using bioinformatic utilities and prune completely missing taxa. When multiple taxa share identical sequences across the entire alignment, RAxML-NG collapses them into a single representative pattern during optimization and restores them at completion to avoid redundant evaluations.
2. Severe Log-Likelihood Discrepancies Across Runs
Symptom: Repeated analyses on the same alignment yield noticeably different tree topologies and log-likelihood scores that differ by more than a few likelihood units.
Diagnostic and Fix: This indicates that the heuristic search is getting trapped in distinct local optima on a rugged likelihood surface, commonly occurring in datasets with conflicting phylogenetic signals or extensive missing data. Increase the number of starting tree searches by specifying a mixture of random and parsimony starting trees in RAxML-NG: –tree rand{20},pars{20}. Evaluating 40 distinct starting trees provides a higher probability of identifying the global maximum likelihood topology.
3. Phylogenetic Terraces
Symptom: In partitioned multi-locus analyses, the software identifies multiple distinct topologies with mathematically identical likelihood scores.
Diagnostic and Fix: When missing gene partitions follow specific combinatorial patterns across taxa, the dataset forms a phylogenetic terrace (Sanderson et al., 2011). RAxML-NG features built-in terrace detection. Check the log file for terrace warnings. To break terrace degeneracy, researchers must either add sequencing data to eliminate missing partition blocks or select a representative tree using parsimony or consensus criteria.
4. Out-of-Memory (OOM) Termination
Symptom: The process is terminated by the operating system kernel (Out of memory: Kill process or std::bad_alloc) during alignment parsing or bootstrap replicate generation.
Diagnostic and Fix: Memory requirements in RAxML scale proportionally with taxa count, distinct site patterns, and rate categories. Pre-calculate memory requirements using raxml-ng –parse, which prints the exact RAM required for double-precision and single-precision arithmetic. If memory is constrained, invoke RAxML-NG with single-precision floating point mode, reduce thread count (each thread maintains private memory buffers), or transfer the calculation to a high-memory HPC node.
5. Thread Oversubscription and Performance Degradation
Symptom: Increasing the allocated CPU core count (e.g., from 8 to 32 threads) results in slower wall-clock execution times.
Diagnostic and Fix: When the number of alignment patterns per thread drops below 500, thread synchronization and OpenMP barrier locks consume more CPU cycles than the likelihood evaluations themselves. Adhere to the Exelixis Lab guideline of allocating 1 thread per 1,000–2,000 patterns. For small alignments (fewer than 5,000 patterns), restrict core allocation to 2–4 threads.
Free alternatives
While RAxML and RAxML-NG remain standard choices for maximum likelihood tree reconstruction, several open-source and free alternatives exist within the academic free statistical software landscape. Each alternative balances algorithmic rigor, heuristic shortcuts, and computational speed differently.
The table below summarizes key operational attributes of leading free phylogenetic software platforms:
| Software | Primary Optimality Criterion | Key Strength | Bootstrapping Method | Target Alignment Scale |
|---|---|---|---|---|
| RAxML-NG | Maximum Likelihood | Rigorous SPR heuristics, TBE support, robust partitioned analyses | Standard non-parametric, TBE, autoMRE | Tens to thousands of taxa; multi-gene matrices |
| IQ-TREE 2 | Maximum Likelihood | Comprehensive automated model selection (ModelFinder), ultrafast bootstrap | UFBoot2 (ultrafast), standard bootstrap | Medium to large phylogenomic supermatrices |
| FastTree 2 | Approximate Maximum Likelihood | Extreme speed and low memory using profile-based neighbor joining and NNI | Local support values (SH-like test) | Hundreds of thousands of sequences (e.g., 16S rRNA) |
| PhyML 3.0 | Maximum Likelihood | Simultaneous tree topology and branch length estimation, custom models | Standard non-parametric, aLRT, aBayes | Small to moderate alignments (tens to hundreds of taxa) |
| PAUP* 4.0 | Parsimony, ML, Distance | Exhaustive branch-and-bound searches, diverse optimality criteria | Non-parametric bootstrapping | Rigorous parsimony and model-based analysis on modest taxa |
Researchers selecting among these platforms should evaluate their specific data scale and biological question:
- RAxML-NG vs. IQ-TREE 2: Both represent top-tier maximum likelihood engines. IQ-TREE 2 excels when automated model testing (ModelFinder) across hundreds of substitution models is needed prior to tree building, and its UFBoot2 provides rapid branch assessments. RAxML-NG is widely favored for large-scale HPC pipelines, strict reproducible benchmarking, and robust handling of partitioned alignments with missing data.
- FastTree 2: When analyzing alignments containing 50,000 to 500,000 sequences—such as large-scale microbial taxonomic surveys or dense viral surveillance datasets—standard maximum likelihood tools require prohibitive runtime. FastTree 2 implements heuristic approximations that complete in minutes or hours, albeit with a slight reduction in topological accuracy compared to full SPR-based ML engines.
- PAUP*: While historically a commercial package, modern test builds of PAUP* software are freely available for research and offer unmatched precision for small alignments where exact maximum parsimony or branch-and-bound exploration is desired.
The data table below compares computational specifications, parallelism architectures, and memory scaling parameters across these maximum likelihood tools.
Frequently asked questions
What is the difference between classic RAxML v8 and RAxML-NG?
RAxML-NG is a complete from-scratch rewrite of classic RAxML v8 in C++. It offers improved numerical optimization precision, handles partitioned datasets with non-overlapping missing data more efficiently, supports the Transfer Bootstrap Expectation (TBE) metric, detects phylogenetic terraces, and provides automated parallelization tuning.
Which nucleotide substitution model should I choose in RAxML?
For nucleotide datasets, the General Time Reversible model with Gamma-distributed rate heterogeneity among sites (GTR+G or GTRGAMMA) is the recommended standard. RAxML estimates all six reversible substitution rate parameters and the shape parameter of the Gamma distribution directly from the alignment.
How many bootstrap replicates are necessary for publication?
While 100 to 200 bootstrap replicates were traditionally common due to computational limits, modern research typically uses 500 to 1,000 replicates for final trees. Alternatively, RAxML-NG offers an automated majority-rule consensus stopping criterion (–bs-trees autoMRE) that samples replicates until topological convergence is mathematically achieved.
What is the difference between FBP and TBE bootstrap metrics?
Felsenstein Bootstrap Proportion (FBP) evaluates exact bipartitions, meaning a branch is supported only if the exact split of taxa is present in the replicate tree. In large trees, a single wandering taxon can drop FBP support to near zero. Transfer Bootstrap Expectation (TBE) measures the transfer distance of taxa across branches, providing a robust, nuanced measure of support for deep branches in large phylogenies.
How do I cite RAxML in academic publications?
If you use classic RAxML v8, cite Alexandros Stamatakis (2014), “RAxML version 8: a tool for phylogenetic analysis and post-analysis of large phylogenies,” Bioinformatics, 30(9): 1312–1313. If you use RAxML-NG, cite Alexey M. Kozlov et al. (2019), “RAxML-NG: a fast, scalable and user-friendly tool for maximum likelihood phylogenetic inference,” Bioinformatics, 35(21): 4453–4455.
Why does RAxML produce different trees on consecutive runs?
Maximum likelihood tree search is a heuristic process that explores a complex topological search space. Starting trees generated from different random or parsimony seeds may traverse different hill-climbing paths and converge on different local optima. Setting explicit seeds (e.g., –seed 12345) ensures exact numerical reproducibility across identical software versions.
Sources
- Stamatakis, A. (2014). RAxML version 8: a tool for phylogenetic analysis and post-analysis of large phylogenies. Bioinformatics, 30(9), 1312–1313. https://doi.org/10.1093/bioinformatics/btu033 (Accessed 2026-11-14).
- Kozlov, A. M., Darriba, D., Flouri, T., Morel, B., and Stamatakis, A. (2019). RAxML-NG: a fast, scalable and user-friendly tool for maximum likelihood phylogenetic inference. Bioinformatics, 35(21), 4453–4455. https://doi.org/10.1093/bioinformatics/btz305 (Accessed 2026-11-14).
- Exelixis Lab, Heidelberg Institute for Theoretical Studies (HITS gGmbH). The RAxML v8 User Manual and Documentation. https://cme.h-its.org/exelixis/web/software/raxml/ (Accessed 2026-11-14).
- RAxML-NG Official Documentation and Wiki. GitHub Repository: amkozlov/raxml-ng. https://github.com/amkozlov/raxml-ng/wiki (Accessed 2026-11-14).
- Minh, B. Q., Schmidt, H. A., Chernomor, O., Schrempf, D., Woodhams, M. D., von Haeseler, A., and Lanfear, R. (2020). IQ-TREE 2: New models and efficient methods for phylogenetic inference in the genomic era. Molecular Biology and Evolution, 37(5), 1530–1534. https://doi.org/10.1093/molbev/msaa015 (Accessed 2026-11-14).
- Price, M. N., Dehal, P. S., and Arkin, A. P. (2010). FastTree 2 – Approximately maximum-likelihood trees for large alignments. PLoS ONE, 5(3), e9490. https://doi.org/10.1371/journal.pone.0009490 (Accessed 2026-11-14).
- Guindon, S., Dufayard, J. F., Lefort, V., Anisimova, M., Hordijk, W., and Gascuel, O. (2010). New algorithms and methods to estimate maximum-likelihood phylogenies: assessing the performance of PhyML 3.0. Systematic Biology, 59(3), 307–321. https://doi.org/10.1093/sysbio/syq010 (Accessed 2026-11-14).
Data: Phylogenetic Maximum Likelihood Software Specifications and Performance Characteristics
Comparative specifications, algorithmic foundations, parallelism models, and memory requirements across leading open-source maximum likelihood phylogenetic inference software packages, compiled from developer manuals, official source code repositories, and benchmark publications.
Period covered: 2010/2026. Coverage: Global.
| Software Package | Primary Developer / Lab | Software License | Implementation Language | Parallelism Architecture | Vector Acceleration | Bootstrapping Method | Memory Scaling Pattern |
|---|---|---|---|---|---|---|---|
| RAxML v8 | Alexandros Stamatakis (Exelixis Lab, HITS) | GNU GPLv3 | C | Pthreads / Hybrid MPI-Pthreads | SSE3, AVX, AVX2 | Rapid Bootstrapping (-f a) | Linear with unique site patterns and taxa |
| RAxML-NG | Alexey M. Kozlov / Alexandros Stamatakis | GNU AGPLv3 | C++11 | Pthreads / MPI | SSE3, AVX2, AVX-512 | Felsenstein standard / Transfer Bootstrap (TBE) | Compressed pattern alignment buffer with auto-tuning |
| IQ-TREE 2 | Bui Quang Minh / Arndt von Haeseler | GNU GPLv3 | C++ | OpenMP / MPI | SSE, AVX, AVX2, AVX-512 | Ultrafast Bootstrap (UFBoot2) and standard non-parametric | Linear with site patterns and rate categories |
| PhyML 3.0 | Stéphane Guindon / Olivier Gascuel | GNU GPLv2 | C | OpenMP | SSE vectorization | Standard non-parametric and aLRT SH-like branch support | Linear with taxa count and sequence length |
| FastTree 2 | Morgan N. Price / Adam P. Arkin | GNU GPLv2 | C | OpenMP | SSE2 | Local support values via Shimodaira-Hasegawa test | Sub-quadratic heuristic memory footprint |
Sources
- RAxML version 8: a tool for phylogenetic analysis (accessed 2026-11-14)
- RAxML-NG: a fast, scalable and user-friendly tool (accessed 2026-11-14)
- IQ-TREE 2: New models and efficient methods (accessed 2026-11-14)
- New algorithms and methods to estimate ML phylogenies (PhyML 3.0) (accessed 2026-11-14)
- FastTree 2 - Approximately maximum-likelihood trees (accessed 2026-11-14)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







