toytree is a mature Python library and CLI toolkit for phylogenetic analysis: parsing and writing Newick/NEXUS trees, manipulating tree topology, simulating random and coalescent trees, inferring trees with NJ/UPGMA/consensus/parsimony, computing tree distances, running phylogenetic comparative methods (PIC, PGLS/PGLM, discrete/continuous trait evolution), and drawing publication-quality SVG/HTML figures through toyplot. The codebase is organized as a modular set of subpackages (io, core, drawing, mod, pcm, rtree, infer, enum, distance, annotate, otol, network) with a consistent lazy-import API and a method-binding decorator pattern that attaches subpackage functions to ToyTree objects. A full command-line interface exposes many of these operations and uses a custom binary serialization transport for piping trees between subcommands. The repository also includes a large, versioned validation harness for penalized-pseudolikelihood molecular dating and trait simulators, giving it a hybrid research-data flavor underneath its primary application/library character.
phylotree.js is a JavaScript library for phylogenetic tree visualization and analysis, designed for web-based applications. It provides robust parsing of multiple tree formats (Newick, PhyloXML, NEXUS, NEXML, BEAST), interactive SVG rendering via D3, and a suite of analytical utilities including metrics (Sackin's index, pairwise distances, root-to-tip regression), clustering algorithms (Cluster Picker, PhyloPart), and tree construction (neighbor joining). The library is modular, with separate modules for formats, rendering, metrics, and clustering, and includes CLI tools for common operations like rerooting, tagging, and validation. It is used in production at phylotree.hyphy.org and supports real-world phylogenetic workflows in molecular epidemiology and evolutionary biology. While the codebase demonstrates solid engineering with reusable patterns like an event emitter and a robust Newick parser, it shows signs of technical drift with legacy dependencies (underscore, lodash, moment) and some unused code.
PhyML is a mature C command-line application for maximum-likelihood phylogenetic inference, with optional Bayesian MCMC dating (PhyTime) and spatial phylogeography (PhyREX) modes. It reads DNA/amino-acid alignments in PHYLIP/NEXUS format, estimates substitution-model parameters, performs NNI/SPR topology searches, computes branch supports (aLRT/SH/aBayes), and outputs Newick/NEXUS trees, site-likelihood files, ancestral sequences, and JSON traces. The code is organized around shared tree/edge/node C structures, a pattern-compressed likelihood engine (lk.c), numerical optimization (optimiz.c), and model-specific modules for molecular clocks, coalescent priors, and spatial diffusion models. The architecture is a monolith of C modules compiled into multiple executables via Autotools conditionals. Main entry points are src/main.c (PhyML), src/date.c (PhyTime), and src/phyrex.c (PhyREX); a command-line interface, interactive menu, and XML configuration are all supported. Optional MPI parallelism, BEAGLE hardware acceleration, and SSE/AVX vectorized likelihood kernels exist. The codebase is research-grade and actively maintained, but carries significant technical debt: heavy #ifdef use, large commented-out experimental blocks, stub functions, hardcoded simulation constants, and no automated test suite. It is a scientific application rather than a data pipeline, though it contains simulation and cross-validation research features. The most safely reusable components are the generic numerical routines: Brent/BFGS optimizers, a dense eigen-solver, and a broad statistical/RNG utility library. These are self-contained C implementations that can be extracted into other numerical projects with minimal modification. Likelihood, tree-search, and spatial-model modules are more tightly coupled to PhyML's internal data structures and are less directly reusable. The project serves as a reference implementation for many phylogenetics algorithms, but its engineering quality varies by module.
PAML is a suite of command-line C programs for phylogenetic analysis by maximum likelihood, the de facto standard in molecular evolution for estimating substitution parameters, detecting positive selection (codeml NSsites, branch-site, and clade models), computing dN/dS distances (yn00), simulating sequences (evolver), and estimating divergence times with fossil calibrations (mcmctree). Programs are driven by control files using key = value options, consume sequence alignments and Newick trees, and write detailed text outputs (rst, mlc, mcmc.txt, rates). The primary entry points are standalone executables: codeml, baseml, mcmctree, evolver, yn00, pamp, chi2, and ds. This is research software serving empirical evolutionary biology, not a data pipeline or library. Architecturally, the codebase is monolithic legacy C: a central shared header (src/paml.h) plus large shared implementation files (src/tools.c, src/treesub.c, src/treespace.c) are compiled into each program via #define program macros and direct #include of .c files, with heavy #ifdef conditional compilation. The numerical core is sophisticated and battle-tested — eigen-decomposition of rate matrices, matrix exponentials, Newton/BFGS/Levenberg-Marquardt optimizers, discrete-gamma heterogeneity, Bactrian MCMC proposal kernels, and ESS/HPD diagnostics — but is embedded in global state, fixed-size arrays (requiring recompilation for large datasets), hardcoded limits, and extensive #if 0 dead code. The changelog (doc/pamlHistory.txt) candidly documents known regressions and broken features across its 30-year history, a genuine risk for trust-critical reuse. The repository is actively maintained (version 4.10.10, last commit 2026-01-29) with rigorous versioned releases and an exceptionally detailed changelog. Technical drift is medium: the code style is decades-old C with acknowledged weaknesses (unsafe allocations, platform-dependent system() calls, interactive prompts), but the science remains current and the package is still the reference implementation against which newer phylogenetic methods are validated. The most reusable assets are the self-contained numerical routines in tools.c, the tree parsing and site-pattern compression in treesub.c, and the standalone distribution functions in chi2.c; extracting them into a new project is feasible, whereas the monolithic driver programs are too coupled to be worth reusing directly.