fast-nnt
fast-nnt (read Fast Ent) is a simple Rust implementation of the Neighbor Net algorithm
Introduction
Fast-NNT is a Rust implementation of the NeighborNet algorithm, designed for efficient phylogenetic analysis. It constructs split trees from distance matrices, providing a fast and reliable tool for researchers in evolutionary biology.
Why does this exist when SplitsTree is available?
Well, SplitsTree4/6 are GUI-based applications, while Fast-NNT is a command-line tool that can be easily integrated into automated workflows and pipelines. It's meant to be lightweight and simple to use, you provide a simple input and it generates the nexus file. You can then use this file in R or Python to generate your own plots. This is perfect for people who love to manually beautify their visualizations.
How do the results compare to SplitsTree?
Fast-NNT aims to produce results that are consistent with those generated by SplitsTree, but there may be differences due to the underlying implementations and algorithms used. Users are encouraged to compare the output from Fast-NNT with that of SplitsTree to assess any discrepancies and determine the best tool for their specific needs.

Installation
Install Rust via rustup.
Once Rust is installed you can simply run:
cargo install fast-nnt
Alternatively, you can build from source. Clone and install this repo via:
git clone https://github.com/rhysnewell/fast-nnt.git
cd fast-nnt
cargo install --path .
Usage
Required input is a symmetrical distance matrix, ideally with a header row indicating the taxa labels. Can be separated by any delimiter.
To generate a split nexus file (mostly) identical to SplitsTree4 and SplitsTree6:
fast_nnt neighbour_net -t 4 -i test/data/large_dist_matrix.csv -d output_dir -o prefix -O splits-tree4
Use the new Huson 2023 ordering algorithm (default):
fast_nnt neighbour_net -t 4 -i test/data/large_dist_matrix.csv -d output_dir -o prefix -O huson2023
Output
The output will include a nexus file containing the split network and network layout.
Known issues
- Floating point drift in the CGNR function, as observed in the smoke_30 test.
- Not sure where it is happening, but the final results on real data end up looking pretty much the same so not sure if it is an issue. Will need to be fixed at some point.
TODO
- R bindings for direct use within R
- Python bindings for direct use within Python
- Work on parallelism. Not a priority as the program is fast enough.
- Test on giant datasets.
Citations
If you use this tool in your work, please cite the original authors work:
- Daniel H. Huson and David Bryant. The SplitsTree App: interactive analysis and visualization using phylogenetic trees and networks. Nature Methods (2024) https://doi.org/10.1038/s41592-024-02406-3
You can also cite this repository directly:
- Newell, R. J. P., & McMaster, E. S. (2025). Fast-NNT: Fast NeighborNet Split Trees For Unrooted Phylogenetic Analysis (v0.1.0). Zenodo. https://doi.org/10.5281/zenodo.16907380