how-to · 5 min read
Codon usage and ORF finding: reading a CDS in six frames
Two of the first questions asked of a new coding sequence are how its codons are used and where its protein could start. Both depend on the same basic act: reading the sequence in triplets from a chosen frame. Get the frame wrong and every downstream number shifts.
This guide covers that triplet reading, the meaning of RSCU and ENC, and how six-frame ORF scanning works, using a short worked example that can be checked by hand. It also spells out what these descriptive metrics cannot tell you.
Reading a coding sequence in triplets
A coding sequence is read as non-overlapping triplets called codons. The first base sets the frame, and every codon after it is the next three bases. Because of that, a sequence whose length is not a multiple of three cannot be read as complete codons: one or two bases are left over at the end, which is why a codon-usage calculator rejects such input rather than silently truncating it.
In a complete coding sequence the reading begins at a start codon, usually ATG, and ends at a stop codon, one of TAA, TAG or TGA. RNA uses the same codons with U in place of T, so an RNA sequence is converted to DNA letters before analysis. A terminal stop is expected and handled separately from the sense codons that encode amino acids.
Codon usage, RSCU and ENC
Several codons can encode the same amino acid, so a gene can favor some synonymous codons over others. RSCU puts that on a comparable scale within each amino acid family: the observed count of a codon is divided by the count expected if all its synonymous codons were used equally. RSCU of 1 means equal use, above 1 means preferred and below 1 means underrepresented.
Wright's effective number of codons summarises the whole sequence in one number between 2 and 61. It is built from the homozygosity of each synonymous family, F = (n Σp² − 1)/(n − 1), combined as ENC = 2 + 9/F̄₂ + 1/F̄₃ + 5/F̄₄ + 3/F̄₆. A value close to 61 indicates little bias, while a low value indicates that a few codons dominate. Both metrics describe the sequence; neither proves that selection caused the pattern.
Worked example: a short coding sequence
Take the short CDS ATGTTTGCTTAA. It is 12 bases, a multiple of three, so it reads as four complete codons: ATG, TTT, GCT and TAA. TAA is the terminal stop, so the sense codons are ATG (methionine), TTT (phenylalanine) and GCT (alanine), and the amino acid sequence is MFA.
TTT is the only phenylalanine codon used, so its RSCU is 2 while TTC, which is not used, has an RSCU of 0: phenylalanine has two codons, and all of its four counts went to TTT. GC3 is one G among the three third positions, about 33.3%, and ENC is low because this toy sequence lacks most amino acid families. That illustrates the main caveat: on very short sequences, RSCU and ENC are arithmetic, not biology.
Finding ORFs in six frames
An open reading frame starts at an ATG and ends at the first in-frame stop codon. A sequence has six possible frames: three on the forward strand and three on the reverse complement, because a gene can be encoded on either strand. An ORF finder scans each frame from its own first base, stepping three bases at a time, and records every ATG that reaches a stop.
Two practical choices shape the output. A minimum length in amino acids hides short chance ORFs, which are common because a stop codon appears roughly every 21 codons by chance. Allowing incomplete ORFs shows starts that run to the end of the input without a stop, which often indicate a truncated sequence. Because each ATG is scanned independently, nested ORFs can appear, and the list is a candidate set rather than a gene prediction.
Worked example: locating the ORF
In ATGTTTGCTTAA, forward frame 1 finds the ORF at positions 1 to 12: ATG at the start, TAA as the stop, and three amino acids including the start, so MFA. The reverse complement, TTAAGCAAACAT, contains no ATG in any frame, so the six-frame scan returns this one ORF.
A slightly longer example shows why the frame matters. AATGAAATAA scanned in frame 2, which starts at the second base, gives ATG AAA TAA at positions 2 to 10: start at 2, stop at 10, two amino acids, MK. Scanned in frame 1 the same letters give AAT GAA ATA A, which contains no start and no stop, and the ORF disappears. The frame is part of the question, not an afterthought.
Pitfalls and honest scope
The most common errors are choosing a frame without justification, analyzing a fragment and treating its edge as if it were a real terminus, and pasting a sequence that still contains ambiguity codes. Unknown bases become X, cannot act as start or stop signals, and can hide a codon that would change the reading, so check the warnings before trusting a result.
It is also worth remembering what these tools do not do. Codon usage from one sequence is descriptive, not a reference comparison, and ORF finding uses the standard genetic code with ATG as the only start: alternative starts, mitochondrial codes, introns and splicing are outside the model. Treat the output as a structured first look that makes the next question easier to ask.