Tutorial 6: Visualizing conflicting phylogenetic signal with splits networks
Objectives
Build a consensus splits network from multiple gene trees. Compare how the support cutoff changes the splits retained and how conflict appears in the network.
Prerequisites and working directory
Install PhyKIT and create a working directory. Save the tutorial files there under the listed names, then run the commands from that directory.
mkdir phykit-tutorial-06
cd phykit-tutorial-06
Download these example files into that directory.
Workflow
When analyzing phylogenomic datasets, different genes often support
conflicting tree topologies. PhyKIT's consensus_network command
(aliases: consnet, splitnet, splits_network) extracts
bipartition splits from gene trees, counts their frequency, and
optionally visualizes them as a circular splits network.
Step 1: Prepare a gene-tree file
The downloaded file contains one Newick tree per line:
((A,B),((C,D),(E,F)));
((A,B),(C,(D,(E,F))));
((A,B),((C,D),(E,F)));
(((B,C),A),(D,(E,F)));
Step 2: Run the consensus network analysis
phykit consnet -t consensus_network_tutorial.nwk
This prints a summary of all splits found above the default threshold (0.1):
Number of input trees: 4
Number of taxa: 6
Threshold: 0.1
Total unique splits: 3
Splits above threshold: 3
---
{E, F} 4/4 1.0000
{A, B} 3/4 0.7500
{C, D} 2/4 0.5000
Step 3: Adjust the threshold
To show only splits present in at least 50% of gene trees:
phykit consnet -t consensus_network_tutorial.nwk --threshold 0.5
Step 4: Generate a circular splits network plot
phykit consnet -t consensus_network_tutorial.nwk --plot-output network.png
This creates a circular diagram where taxa are placed at equal angles. Chords connect boundary points of each split; thicker/more opaque chords indicate higher-frequency splits.
Step 5: JSON output
For programmatic downstream analysis:
phykit consnet -t consensus_network_tutorial.nwk --json
Handling trees with different taxon sets
If some gene trees are missing taxa, use --missing-taxa shared to
prune all trees to their intersection before extracting splits:
phykit consnet -t consensus_network_tutorial.nwk --missing-taxa shared
Expected artifacts
The plotting step writes network.png. Compare the reported split support
with the requested threshold. The JSON command exposes the split records for
further analysis.
Troubleshooting
Run
phykit <command> --helpto compare an invocation with the live interface.Confirm that downloaded files are in the current working directory and retain the filenames shown in the tutorial.
For parsing errors, compare taxon names exactly across alignments, trees, and trait tables, including capitalization and underscores.
See Troubleshooting for installation, format, and error-reporting guidance.