Compare codon strategies for a coding sequence

Ask: "Using rnafold, recode this coding sequence with each codon strategy and check each version for sequence liabilities." The example is the 720-nt avGFP coding sequence.

The assistant calls optimize_codons once per strategy, then scan_vector_liabilities on each result. Every recoding is synonymous: the protein is unchanged, and the tool asserts the translation is identical before returning. Real output (examples/mrna_strategies.json):

StrategyCodons changedGC fractionU fractionG-quadruplex motifs
native00.3920.2650
uridine_min1270.4030.1320
gc_max1690.6280.1321
gc_min1260.2710.2640
usage_maxnot run

Two things to notice:

  • gc_max creates a problem the others do not have. Raising GC to 0.63 produced a G-quadruplex motif at positions 162-181 on the reverse strand, GGGTGGGCCAGGGGACGGGG: four tracts of guanines that can fold into a structure that stalls polymerases and ribosomes. Recoding for one property can introduce another, and the scan is how you find out. It lists motifs and windowed energy discontinuities; it does not say what to do about them.
  • usage_max refuses, and says why: it needs a codon usage table for your organism, none was supplied, and none ships with the tool. A strategy that cannot run says so instead of guessing a table.

Going further: how defined is the RNA ensemble?

The design_mrna_panel recipe in the assistant's prompt list does this as one pipeline: generate the strategies, fold each on a CPU, score how defined each ensemble is, and cut. A filter threshold is always yours; the assistant is told not to suggest one. Each number comes with its control (the same measurement on shuffled sequences) and a note when your threshold lies inside the replicate range.

Occupancy percentages from rna_ensemble are a report, not a score. For a long or weakly structured RNA the sampled structures are nearly all different, and cluster percentages then describe the clustering and not the RNA.

Tools used

optimize_codons, scan_vector_liabilities (free); for the pipeline version, get_pipeline_schema, validate_pipeline, estimate_pipeline, submit_pipeline.

Last changed 2026-11-17