Part II · Module 12 · ASTER / ASTRAL-IV

Species-tree inference with ASTRAL-IV

Estimate a coalescent-aware species tree from the independent UCE gene trees inferred with IQ-TREE 3. This module uses astral4, the ASTRAL-IV implementation distributed within the ASTER package.

Objective

Use the collection of locus trees from Module 11 to infer a species tree that explicitly accommodates discordance among gene-tree topologies under the multispecies coalescent framework.

Workflow

UCE alignments → IQ-TREE 3 gene trees → ASTRAL-IV → species tree

1. What is ASTER?

ASTER stands for Accurate Species Tree EstimatoR. It is a family of phylogenomic methods designed for species-tree inference rather than a single program. The ASTER project currently includes:

ASTER
├── ASTRAL-IV
├── ASTRAL-Pro3
├── Weighted ASTRAL
├── CASTER-site
├── CASTER-pair
├── WASTER
├── SISTER
└── D* statistic

These programs address different kinds of phylogenomic input. In this tutorial we use ASTRAL-IV because our input is a set of independently estimated UCE gene-tree topologies.

Why not ASTRAL-Pro3 or Weighted ASTRAL?

ASTRAL-Pro3 targets multi-copy gene-family trees containing paralogs and orthologs. Weighted ASTRAL is designed to incorporate gene-tree branch support and/or branch length information. The standard ASTRAL-IV route used here operates primarily on the gene-tree topologies generated in Module 11.

2. What does ASTRAL-IV estimate?

ASTRAL-IV estimates an unrooted species-tree topology from a collection of unrooted gene trees. It searches for a species tree that maximizes agreement with the quartet relationships induced by the input gene trees.

The method is statistically consistent under the multispecies coalescent (MSC), making it particularly relevant when gene-tree discordance arises from incomplete lineage sorting.

Important biological interpretation

Discordance among gene trees does not automatically imply incomplete lineage sorting. Gene-tree estimation error, introgression, hybridization and other processes can also generate conflict. ASTRAL-IV models the coalescent component of gene-tree discordance; it should therefore be interpreted together with additional evidence when conflict is extensive.

3. Why ASTRAL-IV instead of ASTRAL-III?

ASTRAL-IV is a modern reimplementation of ASTRAL designed to scale better to large phylogenomic datasets, including analyses with many loci, missing taxa and multiple individuals per species.

ASTER also integrates CASTLES-II into ASTRAL-IV. This allows the inferred species tree to receive terminal and internal branch lengths measured in substitutions per site, which are more directly useful in many downstream comparative analyses than topology alone.

ASTRAL-IV does not reproduce every feature of ASTRAL-III. In particular, the official documentation notes that ASTRAL-IV does not implement the same bootstrap workflow as ASTRAL-III. Its standard branch-support measure is the local posterior probability.

4. Install ASTER

Keep ASTER in a separate environment from PHYLUCE. The current Bioconda package provides ASTER 1.25, whose ASTRAL-IV component is version 1.25.4.8.

conda create -n uce-aster \
  -c conda-forge \
  -c bioconda \
  aster=1.25

conda activate uce-aster

Confirm that astral4 is available:

astral4

Running astral4 without arguments prints the available command-line options.

Platform support

Bioconda currently provides ASTER for Linux and macOS, including Apple Silicon. The upstream ASTER project also distributes platform-specific binaries and source code.

5. Define the gene-tree input

Use the locus-tree file created by IQ-TREE 3 in Module 11.

PROJECT="/path/to/my_UCE_project"

DATASET="$PROJECT/taxon-sets/all"

GENE_TREES="$DATASET/gene-trees-75p/uce75_loci.treefile"

ASTER_OUT="$DATASET/astral4-75p"
THREADS=8

mkdir -p "$ASTER_OUT"
GENE_TREES
Newick file containing one independently inferred UCE gene tree per line.
ASTER_OUT
Directory where the ASTRAL-IV species tree and log will be stored.
THREADS
Number of CPU threads supplied to ASTRAL-IV.

6. Check the gene-tree file

Count the input gene trees:

grep -cve '^[[:space:]]*$' "$GENE_TREES"

Inspect the first few trees:

head -5 "$GENE_TREES"

ASTRAL-IV accepts input trees with missing taxa and unresolved branches. Gene trees do not need to contain the same taxon set at every locus.

Do not root the individual gene trees

Standard ASTRAL-IV species-tree inference is based on unrooted gene-tree topologies. The IQ-TREE locus trees from Module 11 can therefore be supplied directly.

7. Run ASTRAL-IV

SPECIES_TREE="$ASTER_OUT/uce75_astral4.tree"
ASTER_LOG="$ASTER_OUT/uce75_astral4.log"

astral4 \
  -i "$GENE_TREES" \
  -t "$THREADS" \
  -u 2 \
  -o "$SPECIES_TREE" \
  2> "$ASTER_LOG"
-i
Input file containing the UCE gene trees in Newick format.
-t
Number of CPU threads used by ASTER.
-u 2
Requests additional branch annotations, including support information for the three alternative quartet resolutions.
-o
Writes the inferred species tree to a Newick file.
2>
Redirects the ASTER diagnostic output and search information to a log file.
Why save stderr?

The ASTER documentation explicitly recommends retaining the log. It records the execution and search information needed to audit or troubleshoot the analysis.

8. Rooting the species tree

ASTRAL species-tree topology inference is fundamentally unrooted. However, ASTRAL-IV also estimates branch lengths through integrated CASTLES-II, and the ASTER documentation strongly recommends correct rooting when accurate branch lengths are required.

If a biologically justified outgroup is known, specify it directly:

OUTGROUP="outgroup_sample"

astral4 \
  -i "$GENE_TREES" \
  -t "$THREADS" \
  -u 2 \
  --root "$OUTGROUP" \
  -o "$ASTER_OUT/uce75_astral4_rooted.tree" \
  2> "$ASTER_OUT/uce75_astral4_rooted.log"
Do not choose an arbitrary root

Rooting should follow biological and sampling knowledge. If no defensible outgroup exists, retain the species-tree topology as unrooted rather than imposing an unsupported root.

9. Branch support: local posterior probabilities

Standard ASTRAL-IV reports branch support as local posterior probabilities (localPP). These values are derived from quartet support around an internal branch and quantify support for that local species-tree resolution.

With -u 2, ASTER can additionally annotate branches with information describing support for all three alternative quartet resolutions around each branch. This is useful for distinguishing strongly supported relationships from branches showing substantial alternative quartet support.

localPP is not bootstrap support

Do not describe ASTRAL-IV local posterior probabilities as bootstrap percentages. They are different statistical summaries and should be reported using the terminology used by ASTRAL.

10. Branch lengths with CASTLES-II

ASTRAL-IV integrates CASTLES-II to estimate branch lengths for the species tree using information from the input gene trees. These branch lengths are reported in substitutions per site.

This differs from older ASTRAL workflows in which attention often focused primarily on topology or internal branch lengths in coalescent units.

Why this is useful

Substitution-per-site branch lengths are directly interpretable by many downstream phylogenetic and comparative tools. Their biological interpretation still depends on the assumptions of the underlying gene trees, substitution processes and species-tree model.

11. Multiple individuals per species

If several sampled individuals represent the same biological species, ASTRAL-IV can associate those tips with a single species using a mapping file.

Example:

individual01 species_A
individual02 species_A
individual03 species_B
individual04 species_B
individual05 species_C

Then run:

SPECIES_MAP="$DATASET/species.map"

astral4 \
  -i "$GENE_TREES" \
  -a "$SPECIES_MAP" \
  -t "$THREADS" \
  -u 2 \
  -o "$ASTER_OUT/uce75_astral4_species.tree" \
  2> "$ASTER_OUT/uce75_astral4_species.log"

If every sample already represents a separate terminal species or operational taxon, no mapping file is required.

12. Search strategy and the -R option

ASTER performs several rounds of species-tree search and exploration. The documented defaults use four initial search rounds and four subsampling/exploration rounds.

For relatively small datasets — the ASTER documentation specifically mentions datasets with no more than approximately 50 species and 500 genes — additional search rounds can be requested with:

astral4 \
  -R \
  -i "$GENE_TREES" \
  -t "$THREADS" \
  -u 2 \
  -o "$ASTER_OUT/uce75_astral4_R.tree" \
  2> "$ASTER_OUT/uce75_astral4_R.log"

The -R shortcut increases the search effort. Use it when the additional computation is reasonable and report its use in the methods.

13. Expected output

astral4-75p/
├── uce75_astral4.tree
└── uce75_astral4.log

The tree is written in Newick format and can contain:

Species-tree topology
Branch lengths
local posterior probabilities
Quartet-support annotations

Inspect the result:

cat "$SPECIES_TREE"

tail -50 "$ASTER_LOG"

14. What ASTRAL-IV does not tell you by itself

A highly supported ASTRAL-IV topology does not identify the biological cause of gene-tree discordance. The multispecies coalescent explicitly accommodates incomplete lineage sorting, but observed conflict can also involve:

Gene-tree estimation error
Low phylogenetic information
Incomplete lineage sorting
Introgression
Hybridization
Gene duplication/loss
Other model violations

For this reason, the ASTRAL-IV tree should be interpreted together with the concatenated IQ-TREE topology, gene-tree variation and later discordance or reticulation analyses when those questions are biologically relevant.

15. Concatenation and species tree are complementary

UCE alignments
│
├── AMAS supermatrix
│   └── IQ-TREE 3
│       └── Concatenated ML tree
│
└── Individual UCE alignments
    └── IQ-TREE 3 gene trees
        └── ASTRAL-IV
            └── Coalescent species tree

Agreement between the two approaches can strengthen confidence in major relationships. Discordance between them is itself biologically and methodologically informative and should be investigated rather than hidden.

16. Pre-flight check

✓ ASTER / ASTRAL-IV is installed in a dedicated environment.
✓ The input contains one UCE gene tree per line.
✓ Gene trees were not unnecessarily rooted before ASTRAL-IV.
✓ Missing taxa among loci were retained rather than artificially filled.
✓ The ASTER log was redirected and retained.
✓ localPP values are interpreted as local posterior probabilities, not bootstrap support.
✓ Rooting was applied only when a biologically defensible outgroup was available.
✓ Multiple individuals were mapped to species when required.
✓ The ASTRAL-IV topology will be compared with the concatenated IQ-TREE tree.

References and official documentation

ASTER — official repository

ASTRAL-IV — official tutorial

ASTER — Bioconda package

Primary ASTER citation

Zhang C, Nielsen R, Mirarab S. 2025. ASTER: A Package for Large-Scale Phylogenomic Reconstructions. Molecular Biology and Evolution 42(8):msaf172. doi:10.1093/molbev/msaf172

CASTLES-II / branch-length citation

Tabatabaee Y, Zhang C, Warnow T, Mirarab S. 2023. Phylogenomic branch length estimation using quartets. Bioinformatics 39(Suppl 1):i185–i193. doi:10.1093/bioinformatics/btad221

Software version used in this tutorial

For reproducibility, this module pins the Bioconda ASTER package at 1.25. The corresponding ASTRAL-IV component is documented as v1.25.4.8. Upstream ASTER development can move ahead of packaged releases, so record the exact installed version in publications and archived workflows.

← Gene-tree inference Next: Building a UCE pseudoreference →