Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical & Research SuppliesReagents, PPE & instruments — chain-of-custody documented.Fast, traceable sourcing built for regulated research environments, from bench consumables to instrumentation.Shop lac.us CodeCASRAIlac.us

Make a Phylogenetic Tree: Software and Methods

Make a phylogenetic tree from molecular sequence data using MEGA or IQ-TREE. Follow step-by-step alignment, model testing, and bootstrap validation methods.

Written and maintained by CASRAI Editorial Board

Last updated

To make a phylogenetic tree, researchers align homologous nucleotide or amino acid sequences, evaluate evolutionary substitution models, infer branching topology through distance or maximum-likelihood algorithms, and validate clade reliability using bootstrap resampling. The resulting tree represents the inferred evolutionary relationships and ancestral divergence among biological taxa, genes, or pathogens.

What phylogenetic tree construction is used for in research

Phylogenetic tree construction is central to evolutionary biology, molecular epidemiology, systematics, and comparative genomics. Research applications include:

  • Epidemiological tracking and pathogen transmission: Reconstructing the transmission chains and mutation rates of viral or bacterial pathogens during disease outbreaks.
  • Orthology and gene family evolution: Determining whether sequence similarity between genes reflects speciation events (orthologs) or gene duplication events (paralogs) to infer protein function.
  • Species taxonomy and systematics: Resolving phylogenetic classifications and evolutionary relationships among extinct and extant organisms.
  • Molecular dating: Calibrating substitution rates against fossil records or known sampling dates to estimate divergence times across lineages.

Understanding tree architecture is essential before initiating software construction. A phylogenetic tree models evolutionary divergence through proportional branch lengths, whereas a basic cladogram illustrates only branching order and cladistic grouping without conveying genetic distance or evolutionary time. Every tree contains internal nodes representing hypothetical common ancestors, terminal nodes (tips or leaves) representing sampled operational taxonomic units (taxa or genes), and clades representing monophyletic groups composed of an ancestor and all its descendants. For detailed guidance on interpreting topological features once a tree is generated, refer to how to read a phylogenetic tree.

Install or access phylogenetic tree software

Tree construction software spans graphical user interface (GUI) applications for interactive analysis and command-line interface (CLI) tools for high-throughput, scriptable pipelines. Always obtain installation packages directly from official project repositories:

  • MEGA (Molecular Evolutionary Genetics Analysis): The standard desktop GUI tool for desktop sequence alignment and phylogenetic inference. Download official installers for Windows, macOS, or Linux directly from the MEGA Software Portal.
  • IQ-TREE 2: A high-performance command-line software package for maximum-likelihood tree estimation, automated model selection, and ultra-fast bootstrapping. Download official precompiled binaries from IQ-TREE Official Site, or install via Bioconda using conda install -c bioconda iqtree.
  • NCBI Tree Viewer: A web-based tree visualization engine that allows researchers to upload Newick, Nexus, or ASN files directly in a browser without local software installation via the NCBI Tree Viewer Portal.

Step-by-step: construct a phylogenetic tree in MEGA

Follow this standard six-step protocol to build, calculate, and draw a phylogenetic tree from unaligned FASTA sequences using MEGA11 or MEGA12:

  1. Initialize alignment explorer: Launch MEGA. In the main menu bar, click Align and select Edit/Build Alignment. When prompted, select Create a new alignment and choose your molecular sequence data type (DNA or Protein).
  2. Import and align homologous sequences: In the Alignment Explorer window, choose Data → Open → Insert Sequence From File to load your FASTA file. Ensure an outgroup sequence is included if you plan to root the tree. Select all sequences (press Ctrl+A or Cmd+A), navigate to the Alignment menu, and click Align by MUSCLE or Align by ClustalW. Accept default gap penalties and run the alignment. For larger datasets, evaluate comparative performance using multiple sequence alignment tools or dedicated alignment engines like Clustal Omega.
  3. Export aligned data: Once sequence ends are inspected and aligned columns verified, select Data → Export Alignment → MEGA Format. Save the file with a .meg extension. When prompted, provide a title for the dataset and confirm whether sequences represent protein-coding nucleotide data.
  4. Determine the best-fit substitution model: Return to the main MEGA window. Click Models → Find Best DNA/Protein Models (ML). Select your saved .meg file. MEGA computes likelihood scores across dozens of substitution schemes (such as Jukes-Cantor, Kimura 2-Parameter, Tamura-Nei, and General Time Reversible) combined with gamma distributed rates (+G) and invariant sites (+I). Identify the model that minimizes the Bayesian Information Criterion (BIC) or corrected Akaike Information Criterion (AICc).
  5. Infer phylogeny and test confidence: Click the Phylogeny menu in the main window. For rigorous publication analysis, choose Construct/Test Maximum Likelihood Tree (or Construct/Test Neighbor-Joining Tree for rapid distance exploration). Under analysis preferences: set Model/Method to the best-fit model identified in step 4; configure Rates among Sites (e.g., Gamma distributed with 5 discrete categories); and under Test of Phylogeny, select Bootstrap method with 1000 replications to calculate non-parametric branch support. Click Compute.
  6. Root, format, and export in Tree Explorer: Upon computation, the interactive Tree Explorer window opens. To establish evolutionary directionality, click the branch leading to your chosen outgroup taxon and select Re-root with outgroup from the toolbar. Adjust node labels, toggle bootstrap values, choose layout projection (Traditional Rectangular, Radiation, or Circular), and export the tree graphic via Image → Save as PDF File, SVG, or high-resolution TIFF. Save the raw topology as a Newick file (.nwk) via File → Export Current Tree.

Command-line alternative: maximum likelihood with IQ-TREE 2

For high-throughput phylogenomics or multi-gene concatenated alignments, command-line tools provide scriptable execution and advanced statistical modelling. IQ-TREE 2 integrates automated model selection (ModelFinder), ultrafast bootstrap approximation, and tree searching into a single command:

iqtree2 -s alignment.fasta -m MFP -B 1000 -T AUTO

The parameter flags perform the following operations:

  • -s alignment.fasta: Specifies the input multiple sequence alignment in FASTA, PHYLIP, or NEXUS format.
  • -m MFP: Invokes ModelFinder Plus, which systematically calculates log-likelihood scores across hundreds of substitution matrices and automatically applies the optimal model based on BIC.
  • -B 1000: Executes 1,000 replicates of the UltraFast Bootstrap (UFBoot2) algorithm, reducing computational runtime from days to minutes while controlling for branch-support overconfidence. For background on resampling theory, see bootstrapping.
  • -T AUTO: Automatically detects CPU core availability and multithreads the likelihood calculations across processor cores.

For Bayesian phylogenetic inference rather than maximum likelihood, tools such as MrBayes or BEAST sample tree space using Markov Chain Monte Carlo algorithms to generate posterior probability distributions over tree topologies.

Output and how to read it

Phylogenetic software generates standardized machine-readable files alongside graphical visualizations. The two primary outputs are:

  • Newick string format (.treefile or .nwk): A nested parenthetical notation where commas separate sister taxa, colons indicate branch lengths, and internal parentheses represent ancestral nodes. For example: ((TaxonA:0.042,TaxonB:0.038)98:0.015,TaxonC:0.081); indicates that Taxon A and Taxon B form a monophyletic clade supported by a bootstrap value of 98%, with a branch length of 0.015 substitutions per site leading to their common ancestor.
  • Analysis log and model report (.iqtree or MEGA summary): Contains exact log-likelihood values, selected base frequencies, transition/transversion ratios, alpha shape parameters for gamma distribution, and character matrix summary statistics.

When interpreting tree branches and nodes:

  • Branch length: Horizontal branch lengths correspond to the expected number of nucleotide or amino acid substitutions per site. A scale bar of 0.05 indicates 5 substitutions per 100 aligned positions. Vertical lines serve only to connect branches and contain no evolutionary information.
  • Bootstrap support values: Numbers positioned at internal nodes indicate the percentage of pseudo-replicate datasets that recovered that specific bipartition. In standard Felsenstein non-parametric bootstrapping, values of 70% or greater represent moderate support, while values above 85% represent robust support. In IQ-TREE UltraFast Bootstrapping (UFBoot), the threshold for strong clade support is 95% or higher.
  • Clade relationships: Evolutionary relatedness is determined exclusively by the recency of shared common ancestry (internal branching points), never by the vertical order of taxon tips along the page margin. Rotating branches around any internal node does not alter evolutionary relationships.

Troubleshooting phylogenetic tree construction

Common methodological errors and computational artifacts frequently distort inferred topologies. Use this diagnostic matrix to resolve issues during tree construction:

Observed Issue Probable Cause Corrective Action
Polytomy or star tree (multiple branches radiating from single node) Insufficient sequence divergence or alignment of identical sequences. Select a faster-evolving genetic locus (e.g., mitochondrial D-loop or ribosomal internal transcribed spacer ITS instead of conserved 16S/18S rRNA) or increase sequence length.
Long-Branch Attraction (LBA artifact) Two rapidly evolving, divergent taxa artifactually cluster together due to homoplasy. Replace parsimony or distance methods with Maximum Likelihood using a Gamma rate distribution (+G); add intermediate taxa to break long branches.
Inverted or uninterpretable root Arbitrary midpoint rooting applied when rate constancy across lineages is violated. Designate a distinct, biologically verified outgroup taxon from a closely related sister lineage to root the tree explicitly.
Low bootstrap support (< 50%) across deep internal nodes Mutational saturation at deep evolutionary timescales, erasing phylogenetic signal. Remove highly saturated third codon positions in protein-coding DNA, analyze translated amino acid sequences, or partition substitution models across loci.
Software failure or memory exhaustion during alignment Sequence files contain non-standard IUPAC characters, spaces in FASTA headers, or uneven lengths. Clean FASTA headers to alphanumeric characters and underscores; verify sequence integrity before importing into the alignment editor.

Free alternatives for tree building and drawing

Depending on dataset size, technical infrastructure, and publication visualization requirements, several free, peer-reviewed software packages serve distinct research needs:

Software Package Interface Core Inference Methods Best Research Scenario Official Documentation
MEGA (MEGA11/12) Desktop GUI / CLI Maximum Likelihood, Neighbor-Joining, Maximum Parsimony, UPGMA Small to mid-sized gene alignments; visual sequence editing, model testing, and interactive tree customization. megasoftware.net
IQ-TREE 2 CLI / Web Server Maximum Likelihood, ModelFinder, Complex Partition Models Rigorous, publication-grade maximum likelihood phylogenomics with automated model selection and UltraFast Bootstrapping. iqtree.org/doc
RAxML-NG Command-line Maximum Likelihood Large-scale phylogenomic datasets, whole genomes, and massive multi-gene alignments requiring HPC cluster execution. github.com/amkozlov/raxml-ng
FastTree 2 Command-line Approximately-Maximum-Likelihood Ultra-large alignments exceeding 10,000 to 100,000 sequences where full maximum-likelihood optimization is computationally prohibitive. microbesonline.org/fasttree
FigTree / iTOL GUI / Web Tree Visualization, Annotation and Drawing Styling, annotating, and coloring pre-calculated Newick/Nexus tree files into high-resolution vector figures for publication. tree.bio.ed.ac.uk/software/figtree

Frequently asked questions

What is the difference between a phylogenetic tree and a cladogram?

A cladogram depicts only the relative branching order and nested relationships among taxa; its branch lengths carry no meaning. A phylogenetic tree (specifically a phylogram or chronogram) encodes evolutionary divergence or elapsed time within its branch lengths, where length corresponds directly to the estimated number of character changes per site or millions of years.

How do you build a phylogenetic tree from raw FASTA sequences?

Raw unaligned FASTA sequences cannot be converted directly into an accurate phylogenetic tree. You must first align the sequences using a multiple sequence alignment algorithm such as MUSCLE, ClustalW, or MAFFT to establish site-by-site positional homology across all taxa. Once aligned and exported, the alignment matrix is subjected to model testing and phylogenetic inference algorithms.

Which method is better: Neighbor-Joining or Maximum Likelihood?

Maximum Likelihood (ML) is statistically superior because it evaluates explicit probabilistic models of sequence evolution, accounts for rate variation among sites, and is significantly less prone to long-branch attraction artifacts. Neighbor-Joining (NJ) is a distance-based heuristic that computes much faster, making it suitable for rapid preliminary inspection or very large alignments, but ML remains the gold standard for publication-grade research.

What bootstrap value is considered statistically reliable?

In traditional Felsenstein non-parametric bootstrapping, a node value of 70% or greater is generally accepted as moderate support, while values exceeding 85% indicate robust statistical confidence. When using UltraFast Bootstrap (UFBoot2) in IQ-TREE, support values are interpreted more stringently: a threshold of 95% or higher corresponds to strong, reliable clade support.

Can you make a phylogenetic tree online without installing software?

Yes. Web servers such as the IQ-TREE Web Server, EMBL-EBI Simple Phylogeny, and the NCBI BLAST Tree View widget allow researchers to upload aligned FASTA files and compute trees directly on remote compute clusters. However, local desktop applications like MEGA or command-line tools like IQ-TREE provide greater control over substitution models, bootstrap iterations, and graphical annotation.

Sources

  • Tamura K, Stecher G, Kumar S. MEGA11: Molecular Evolutionary Genetics Analysis Version 11. Molecular Biology and Evolution, 38(7), 3022–3027 (2021). Official manual verified 2026-11-07 at https://www.megasoftware.net/.
  • Minh BQ, Schmidt HA, Chernomor O, Schrempf D, Woodhams MD, von Haeseler A, Lanfear R. IQ-TREE 2: New Models and Efficient Methods for Phylogenetic Inference in the Genomic Era. Molecular Biology and Evolution, 37(5), 1530–1534 (2020). Official documentation verified 2026-11-07 at http://www.iqtree.org/doc/.
  • National Center for Biotechnology Information (NCBI). Tree Viewer User Guide. Verified 2026-11-07 at https://www.ncbi.nlm.nih.gov/tools/treeviewer/.
  • Felsenstein J. Confidence limits on phylogenies: An approach using the bootstrap. Evolution, 39(4), 783–791 (1985).
  • European Bioinformatics Institute (EMBL-EBI). Multiple Sequence Alignment and Phylogeny Services. Verified 2026-11-07 at https://www.ebi.ac.uk/Tools/phylogeny/.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Make a Phylogenetic Tree: Software and Methods

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →