Skip to content

How do I reverse complement, translate, or check the composition of a sequence?

Work with a DNA sequence

The everyday sequence operations, and the conventions that silently differ.

Reverse complement, translation and GC content are the three operations you reach for without thinking, which is exactly why their conventions are worth stating once.

Reverse complement is not the same as complement. Sequences are written 5′→3′ by convention, so the partner strand has to be reversed as well as complemented to be written the same way. Getting this wrong produces a sequence that looks entirely reasonable and orders a primer that anneals nowhere.

Translation needs a reading frame and a genetic code, and neither is safe to assume. Six frames exist for any sequence, three on each strand. The standard code is not universal: vertebrate mitochondria read TGA as tryptophan rather than stop, and several ciliates reassign the stop codons entirely — so translating a mitochondrial gene with the standard table truncates it at the first TGA.

GC content is arithmetic, but decide in advance what ambiguity codes should do. Counting them, ignoring them, or refusing them all give different denominators.

For anything longer than a page — annotating a plasmid, tracking features, keeping a construct history — use a sequence editor rather than a string operation. Manual editing of long sequences is where silent frame shifts come from.

What to use

Drafted from the literature and not yet reviewed by a specialist. Treat it as a starting point, and tell us if something here is wrong. Last touched .

All tasks →