Skip to content

PhyTop

PhyTop visualizes the signals of incomplete lineage sorting (ILS) and introgression or hybridization (IH) on a species tree inferred with ASTRAL. For each node of the tree, it computes the proportions of the three possible gene tree topologies and the ILS and IH indexes, and draws them as bar or pie charts on the tree.

License

Free to use and open source under the GNU General Public License v3.0.

Available

  • Roihu-CPU: 0.3, via the bio-apps module.

Usage

PhyTop is part of the bio-apps collection on Roihu. Load the bio-apps module tree and then the PhyTop module:

module load bio-apps/v202603
module load phytop/0.3

The module also loads ASTER, which includes ASTRAL-IV (astral4). PhyTop needs the species tree from ASTRAL run with the option -u 2, which adds the support for all three topologies of each branch. For example, from a file of gene trees:

astral4 -t 4 -u 2 -o astral.tree genetrees.nwk

Then draw the charts:

phytop astral.tree

PhyTop writes the tree with the charts to astral.tree.pdf and the values of each node to astral.tree.info.tsv. Use -pie for pie charts instead of bar charts and -pre to set another output prefix. Run phytop -h to see all options.

Example batch script

#!/bin/bash
#SBATCH --job-name=phytop
#SBATCH --account=<project>
#SBATCH --output=output_%j.txt
#SBATCH --error=errors_%j.txt
#SBATCH --partition=small
#SBATCH --time=01:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --mem=8G

module load bio-apps/v202603
module load phytop/0.3

astral4 -t $SLURM_CPUS_PER_TASK -u 2 -o astral.tree genetrees.nwk
phytop astral.tree

Replace <project> with your CSC project (for example project_2001234).

See creating a batch job script for Roihu for more information about running batch jobs.

Support

CSC Service Desk

More information

December 2, 2026