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.
METHOD
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.
| Code | Complement | Meaning |
|---|---|---|
| A | T (U in RNA) | adenine |
| C | G | cytosine |
| R | Y | A or G / C or T |
| K | M | G or T / A or C |
| B | V | not A / not T |
| D | H | not C / not G |
| S | S | C or G |
| W | W | A or T |
| N | N | any 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
- 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
WORKED EXAMPLE
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.
WHERE THIS RUNS
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.