Understanding the reverse complement and translation tool — concept and principle
DNA is double-stranded, and the two strands run in opposite directions. Whenever you design a reverse primer, check a sequencing read from the other strand, or look for an open reading frame, you need the reverse complement of a sequence and often its protein translation. This tool returns both, together with the sequence length.
How it is calculated
- The input is cleaned: letters are made upper case and anything other than A, C, G, T or N is removed.
- Reverse complement: each base is replaced by its partner (A↔T, G↔C, N stays N) and the order is reversed. The output is grouped in blocks of 10 for easier reading.
- Translation (frame 1): starting at the first base, every three bases form a codon, translated with the standard genetic code. A stop codon is shown as *, and a codon containing N becomes X. Leftover bases at the end are ignored.
- Length is the number of cleaned bases.
The principle
Base pairing is fixed (A with T, G with C), and the strands are antiparallel: one runs 5′→3′ left to right, its partner 5′→3′ right to left. Writing the partner strand in the conventional 5′→3′ direction therefore requires both complementing and reversing. Translation follows the standard code of 64 codons: 61 encode amino acids and three (TAA, TAG, TGA) are stops. The tool looks codons up in a table ordered T, C, A, G for each position, computing an index of 16 × first + 4 × second + third.
Worked example
- Input: ATGGCCATTGTAATGGGCCGCTGA, length 24 bp.
- Complement each base: TACCGGTAACATTACCCGGCGACT.
- Reverse it: TCAGCGGCCCATTACAATGGCCAT, displayed as TCAGCGGCCC ATTACAATGG CCAT.
- Codons in frame 1: ATG GCC ATT GTA ATG GGC CGC TGA.
- Translation: Met Ala Ile Val Met Gly Arg Stop = MAIVMGR*.
How to read the result
A protein that starts with M and ends with a single * at the end of the sequence suggests a complete open reading frame. Stops scattered through the middle usually mean the wrong frame or the wrong strand; translate the reverse complement too, or shift the start by one or two bases. Many X characters indicate ambiguous bases in the input.
Common mistakes
- Using only the complement (not reversed) when ordering a reverse primer.
- Pasting RNA with U; U is removed, so convert U to T first.
- Expecting all six frames; this tool translates frame 1 of the given strand only.
Frequently asked questions
What is the difference between complement and reverse complement?
The complement swaps each base but keeps the order (3′→5′); the reverse complement also reverses it so the strand reads 5′→3′, the standard way to write DNA.
How do I find the right reading frame?
Translate all three frames on both strands and look for the longest stretch without stops, usually starting with ATG.
Are IUPAC ambiguity codes like R or Y supported?
No. Only A, C, G, T and N are kept; other letters are dropped, which can shift the frame, so replace them with N first.
Sources: NCBI, The Genetic Codes (translation table 1, standard code) · Alberts, B. et al., Molecular Biology of the Cell (Garland Science)