Nucleora / Tools / Reverse complement

Reverse complement of a DNA or RNA sequence

Reverse complement, complement or reverse, with every IUPAC ambiguity code, upper and lower case carried through, and as many FASTA records as you paste.

RCreverse complementcomputed in this page

Input

Result

Method: each base is replaced by its IUPAC complement and the string is reversed; record headers are kept and labelled. Limit: characters that are not IUPAC nucleotide codes are removed and listed, never guessed. Digits and whitespace are ignored.

How it is calculated

The reverse complement of a strand is the sequence of its partner strand, read 5′→3′. Each position is complemented and the result is reversed. Ambiguity codes map to the code for the partner set of bases, so a degenerate primer stays correctly degenerate.

reverse complement(s) = complement(s_n) complement(s_n−1) ... complement(s_1)
CodeComplementMeaning
AT (U in RNA)adenine
CGcytosine
RYA or G / C or T
KMG or T / A or C
BVnot A / not T
DHnot C / not G
SSC or G
WWA or T
NNany base

The output alphabet follows your choice. In "Auto", a record that contains U and no T is written as RNA (U); anything else is written as DNA (T). The same IUPAC rules apply to both. Upper and lower case are carried through position by position when "Preserve case" is on, so lower-case annotation (a primer site, a masked repeat) moves to the matching position on the other strand.

Which calculation this page matches

Output is identical to Biopython's Bio.Seq.reverse_complement, complement and reverse_complement_rna on every IUPAC code in both cases.

References

  1. Nomenclature Committee of the International Union of Biochemistry (1985) Nomenclature for incompletely specified bases in nucleic acid sequences. Recommendations 1984. Eur J Biochem 150:1-5. doi:10.1111/j.1432-1033.1985.tb08977.x

A worked example, computed by this page

Three records in one paste: a DNA fragment with a lower-case stretch, a degenerate primer and a short RNA. With "Reverse complement", "Auto" alphabet and "Preserve case", the calculator returns:

Input

>example_1 lowercase marks a primer binding site
ATGACCATGATTACGgatccaagcttGCATGCCTGCA
>degenerate_primer
GCNGARAARTAYGG
>rna_fragment
AUGGCUUACGAU

Output

>example_1 lowercase marks a primer binding site reverse complement
TGCAGGCATGCaagcttggatcCGTAATCATGGTCAT
>degenerate_primer reverse complement
CCRTAYTTYTCNGC
>rna_fragment reverse complement
AUCGUAAGCCAU

The lower-case block gatccaagctt becomes aagcttggatc on the other strand. In the degenerate primer, R and Y swap and N stays N. The third record has U and no T, so it is returned as RNA.

The calculation runs in your browser

The arithmetic on this page is JavaScript executing in your browser. The sequence you enter is not sent anywhere: the calculator makes no network request with it, and there is no account, upload or server-side step. You can disconnect from the network after the page has loaded and the calculator keeps working.