FRESCo is a codon-model based approach to identify synonymous constraint elements in coding regions. (A) In a gene also encoding an additional, overlapping function, we expect to observe reduced synonymous variability. Example 1: this sequence fragment from two hepatitis B virus (HBV) isolates overlaps with both the HBV polymerase and the HbsAg genes. The G to A mutation between the two isolates (shown in red) is synonymous with respect to the polymerase gene but nonsynonymous with respect to the overlapping HbsAg gene. Example 2: this region encodes a portion of the HBV polymerase protein and also contains a binding site for the transcription factor RFX1 . Top: sequence motif based on an alignment of 2,000 HBV sequences. Bottom: RFX1 binding motif for Mus musculus from the Jaspar database . Example 3: the CRE element in the poliovirus genome is contained within the ORF and has strong, highly conserved secondary structure. Base pairs are colored according to their synonymous substitution rate at a single codon resolution. At a single-codon resolution, each codon in the CRE except the one encoding glutamic acid has a significant signal of excess synonymous constraint. (Glutamic acid is encoded by two codons, GAA and GAG, and both are apparently well-tolerated in the RNA secondary structure, probably due to U-G pairing.) (B) Starting with (1) a codon alignment and a phylogenetic tree, we first (2) fit maximum-likelihood global parameters on the full alignment. These parameters include branch lengths and a parameterized codon substitution matrix. We then (3) fit maximum-likelihood local parameters (local synonymous and nonsynonymous substitution rates) across a sliding window. In the null model, the synonymous rate is constrained to 1, while the alternative model allows a window-specific synonymous substitution rate. In each window, we (4) perform model comparison using the likelihood ratio test to identify positions with significantly reduced synonymous variability. ML, maximum likelihood.