The Second Strand
- The DNA molecule is made up of two strands, running in opposite directions.
- Each base bonds to a base in the opposite strand. Adenine always bonds with thymine, and cytosine always bonds with guanine; the complement of a base is the base to which it always bonds; see Figure 1.
- The two strands are twisted together into a long spiral staircase structure called a double helix; see Figure 2.
A number of online tools exist for taking the reverse complement of a given DNA string. Like the
Reverse Complementprogram listed below, the
revseqprogram from the EMBOSS package also performs this function. It can be run online here.
Recall that in a DNA string
Given: A collection of
Return: The number of given strings that match their reverse complements.
>Rosalind_64 ATAT >Rosalind_48 GCATA
BioPython can also be used to take the reverse complement of a DNA string locally. Specifically, the
reverse_complement()functions are suitable for this problem. These methods are associated with the
Seqobject.>>> from Bio.Seq import Seq >>> from Bio.Alphabet import IUPAC >>> my_seq = Seq("GATCGATGGGCCTATATAGGATCGAAAATCGC", IUPAC.unambiguous_dna) >>> my_seq Seq('GATCGATGGGCCTATATAGGATCGAAAATCGC', IUPACUnambiguousDNA()) >>> my_seq.complement() Seq('CTAGCTACCCGGATATATCCTAGCTTTTAGCG', IUPACUnambiguousDNA()) >>> my_seq.reverse_complement() Seq('GCGATTTTCGATCCTATATAGGCCCATCGATC', IUPACUnambiguousDNA())