PHYLIP Algorithms — Live in Your Browser

Run classic phylogenetic analyses powered by phylip-rs, a zero-dependency Rust reimplementation compiled to WebAssembly. No installation required.

35,805
Lines of Rust
0
Dependencies
959
Tests
~225 KB
WASM Binary

← Back to Software Catalog

Distance Matrix & Neighbor-Joining Tree

Compute pairwise evolutionary distances and build a tree using the Neighbor-Joining algorithm (Saitou & Nei, 1987).

Cross-disciplinary connection: Belief Propagation. Felsenstein's pruning algorithm (1973) for computing tree likelihoods was independently discovered as the "belief propagation" or "sum-product" algorithm in electrical engineering and AI. The same message-passing principle powers error-correcting codes, Bayesian networks, and modern neural network inference.

Maximum Likelihood Evaluation

Evaluate the log-likelihood of a tree topology given sequence data under a substitution model. Branch lengths are optimized.

Cross-disciplinary connection: Circuit Theory. Felsenstein's independent contrasts method (1985) for analyzing continuous traits on a phylogeny is mathematically equivalent to computing effective resistance in an electrical circuit. The tree topology becomes a resistor network where branch lengths are resistances, and the "contrasts" at internal nodes are voltage differences.

Maximum Parsimony Search

Find the tree requiring the fewest evolutionary changes using Wagner parsimony with stepwise addition and SPR rearrangements.

Cross-disciplinary connection: Coding Theory. The genetic code's assignment of codons to amino acids is not random — it minimizes the impact of point mutations on protein function. Applying phylogenetic step-matrix analysis to the codon table reveals a z-score of −2.82 against random codes, connecting parsimony to information theory and error-correcting codes in telecommunications.

The Felsenstein Zone: Long Branch Attraction

Simulate DNA evolution on a 4-taxon tree and compare parsimony vs. maximum likelihood. When two unrelated lineages evolve rapidly, parsimony is "positively misleading" — more data makes it more confident in the wrong answer (Felsenstein, 1978).

True tree: ((A:long, B:short):internal, (C:short, D:long))

Cross-disciplinary connection: Simpson's Paradox. Long-branch attraction in phylogenetics is structurally analogous to Simpson's paradox in statistics: a trend that appears in aggregated data reverses when the data is properly stratified. In both cases, ignoring a confounding variable (rate variation / subgroup membership) leads to the wrong conclusion, and an explicit model is needed to avoid the trap.

Bootstrap Confidence & Consensus

Resample alignment columns with replacement, build NJ trees for each replicate, and construct a majority-rule consensus tree showing branch support values.

Cross-disciplinary connection: Efron's Bootstrap. Felsenstein (1985) was among the first to apply Bradley Efron's bootstrap (1979) to phylogenetics. The idea of resampling observed data to estimate uncertainty was revolutionary in statistics and has since been adopted across virtually every empirical science — from medicine to machine learning.