Documentation

CodonOptimizer.php

Chooses the highest-usage synonymous codon for each residue of a target protein Freely inspired by BioPHP's project biophp.org Created 30 September 2026 Last modified 6 October 2026

Table of Contents

Classes

CodonOptimizer
Reuses SequenceInterface::translateCodon() to find every codon synonymous with a residue, the same reuse CodonAdaptationIndexCalculator already makes, rather than hard-coding a second copy of the genetic code. When every synonym of a residue is tied (most commonly because the reference table has no observation for any of them at all), the tie is broken deterministically by codon enumeration order (A<C<G<T, most to least significant base) - an arbitrary but reproducible choice, the same kind of tie-break already used elsewhere in this project (e.g. NeighborJoiningTreeBuilder).
On this page

Search results