Building a phylogenetic tree follows a consistent workflow: collect sequences, align them, choose an evolutionary model, build the tree, then evaluate how reliable it is. Each step feeds directly into the next, and cutting corners early creates problems that compound later. Here’s how the full process works, from raw sequences to a finished tree you can interpret and present.
Step 1: Collect Your Sequences
Every phylogenetic tree starts with a set of related sequences, either DNA, RNA, or protein. The goal is to gather sequences from the organisms or genes you want to compare, plus at least one outgroup (more on that later). The most common source is NCBI’s GenBank database, where millions of sequences are publicly available and searchable by organism, gene name, or accession number.
If you’re starting with a single sequence and want to find its relatives, BLAST (Basic Local Alignment Search Tool) is the standard approach. You paste in your sequence, and BLAST searches databases for statistically significant matches. The results give you a ranked list of similar sequences across species, which you can then download as your starting dataset. For protein-coding genes, you can search nucleotide against nucleotide, protein against protein, or translate between the two depending on your question.
How many sequences you need depends on your question. A tree comparing a handful of species might use 10 to 20 sequences. A broader phylogenomic study could involve hundreds. The key is that all sequences should be genuinely related (homologous) and of similar length, not just superficially similar.
Step 2: Align the Sequences
Raw sequences don’t line up neatly. Insertions, deletions, and mutations mean corresponding positions in different species won’t sit at the same spot in the file. Multiple sequence alignment (MSA) rearranges your sequences so that equivalent positions are stacked in the same column, with gaps inserted where one species has lost or gained nucleotides relative to the others.
Two tools dominate this step. Clustal Omega handles medium to large alignments and works well for both DNA and protein sequences. MUSCLE is particularly strong with protein alignments. Both are available free through EMBL-EBI’s web interface, so you can paste sequences directly into a browser without installing anything. For larger datasets, downloadable versions run faster on your own computer.
After alignment, you’ll typically need to trim the results. Poorly aligned regions, especially near the ends of sequences or in highly variable stretches, add noise rather than signal. Tools like trimAl or Gblocks automatically remove ambiguous columns. Current best practices recommend running your analysis on both trimmed and untrimmed alignments to check whether filtering changes your results. If it does, that’s a sign those regions need closer inspection.
Step 3: Choose a Substitution Model
Not all mutations happen at the same rate. Some nucleotide swaps (like A to G) occur more frequently than others (like A to C). A substitution model tells the tree-building algorithm how to account for these unequal rates. Picking the wrong model is like using the wrong scale on a map: your distances will be off, and so will your tree.
Models range from simple to complex. The simplest assume all substitutions happen equally. More realistic models like HKY85 allow transitions and transversions to occur at different rates. The most flexible, called GTR (general time reversible), lets every possible substitution type have its own rate. Some models also account for the fact that certain positions in a gene evolve faster than others.
You don’t have to pick a model by hand. Software like ModelTest-NG evaluates your alignment against a hierarchy of models and recommends the best fit based on statistical criteria. In raxmlGUI, this step is built right into the interface as a single button. The program tests your data against available models and selects the one that balances accuracy with complexity.
Step 4: Build the Tree
This is where the actual tree gets inferred. The two broad categories of methods are distance-based and character-based, and they work very differently under the hood.
Distance-Based Methods
These convert your alignment into a matrix of pairwise distances (how different is species A from species B?) and then cluster species by similarity. Neighbor-Joining is the most common distance method. It’s fast, handles large datasets easily, and gives reasonable results for straightforward questions. The tradeoff is that it compresses your alignment down to a single distance number for each pair, which means some information gets lost.
Character-Based Methods
Maximum Likelihood (ML) and Bayesian Inference work directly with the aligned sequences rather than summarizing them into distances. ML evaluates many possible tree shapes and asks: given my substitution model, which tree makes these sequences most probable? It then picks the tree with the highest probability. RAxML is one of the most widely used ML programs, known for handling large datasets efficiently. Its graphical interface, raxmlGUI 2.0, runs on Mac, Windows, and Linux without requiring command-line experience, and it comes with RAxML pre-installed.
Bayesian Inference (commonly run in MrBayes) takes a similar approach but incorporates prior expectations and produces a distribution of probable trees rather than a single best tree. It’s computationally heavier but gives you a built-in measure of confidence for every branch.
When you’re unsure which method fits your data best, running both a distance-based and a character-based analysis and comparing results is considered good practice. If the trees agree on the major groupings, you can be more confident in those relationships. Where they disagree, the differences often point to areas where the data is ambiguous.
Step 5: Root the Tree With an Outgroup
An unrooted tree shows relationships but doesn’t tell you which direction evolution flowed. To add directionality, you need a root, and the standard way to place it is with an outgroup: a species you know diverged before all the others in your dataset.
The outgroup connects to the rest of your tree (the ingroup) at a single branch, and that branch becomes the starting point for reading the tree’s evolutionary history. Choosing the right outgroup matters more than most beginners realize. The outgroup should be related enough that it aligns well with your other sequences, but clearly outside the group you’re studying. If you’re building a tree of mammals, for example, a reptile might serve as the outgroup.
A common pitfall is picking an outgroup that’s too distantly related. When the outgroup is very divergent, it accumulates so many independent mutations that the algorithm can mistakenly group it with fast-evolving ingroup species rather than placing it correctly at the base. This artifact, called long branch attraction, produces a misleading root. To reduce this risk, choose outgroups with low substitution rates and similar base composition to your ingroup. Using multiple outgroup species from the same sister group, rather than a single distant taxon, also helps.
Step 6: Evaluate Branch Support
A tree is a hypothesis, not a fact. Some branches will be well-supported by the data and others will be shaky. Bootstrap analysis is the standard way to measure this. The method works by resampling your alignment hundreds or thousands of times, building a new tree from each resampled dataset, and then checking how often each branch appears across all those trees. The result is a percentage for every branch.
Branches with bootstrap values above 80% are generally considered well-supported, though some researchers use a stricter 90% cutoff. In the example of a branch with 63% support, most researchers would treat that grouping as uncertain. Trees in published papers often mark strong branches with asterisks and display exact percentages only for weaker ones, giving readers a quick visual sense of which relationships are solid.
Bayesian analyses produce their own confidence measure called posterior probabilities, which range from 0 to 1. These tend to run higher than bootstrap values for the same data, so a posterior probability of 0.95 is roughly comparable to moderate bootstrap support rather than near-certainty.
Step 7: Visualize and Export
Tree-building software outputs results as text files in standardized formats. The two you’ll encounter most often are Newick and NEXUS. Newick stores the tree as nested parentheses: each pair of parentheses represents a branching point, with branch lengths as numbers. It’s compact, widely supported, and readable by virtually every phylogenetics program. NEXUS wraps Newick-style trees inside a richer format that can also store alignment data and analysis commands, making it useful for programs like MrBayes and PAUP*.
To turn these text files into actual figures, you’ll use tree-viewing software. FigTree is the most popular free option. It reads both Newick and NEXUS files and lets you adjust the visual layout: switching between rectangular, circular, or radial tree shapes, displaying bootstrap values, coloring branches, and exporting publication-ready images. For quick viewing during analysis, most tree-building programs also render a basic tree on screen.
Putting It All Together
A minimal but solid workflow looks like this: download sequences from GenBank, align them with Clustal Omega or MUSCLE, run model selection, build the tree with RAxML or a similar ML program, add bootstrap support, root with an appropriate outgroup, and visualize in FigTree. The entire process can be done with free, browser-based tools for small datasets, or with downloaded software when you need more speed or flexibility.
For reproducibility, save your files at every intermediate step: the raw unaligned sequences, the aligned and trimmed versions, the model selection results, and the final tree files. Sharing these files alongside your results lets others verify and build on your work, which is increasingly expected in published research.

