Nucleic acid sequence (source code)

= Nucleic acid sequence
{wiki}

= Nucleotide sequence
{synonym}

A <nucleic acid sequence> records the ordered <nucleobases> of a <nucleic acid> strand, conventionally read from $5'$ to $3'$. The standard <DNA> alphabet is <adenine> A, <cytosine> C, <guanine> G, and <thymine> T; the standard <RNA> alphabet uses <uracil> U in place of <thymine> T. Each letter denotes the <nucleobase> attached to one <nucleotide>, so the six-letter <DNA> <nucleic acid sequence> $5'\text{-}\mathrm{ACGTAC}\text{-}3'$ describes six linked <nucleotides>. See https://www.genome.gov/genetics-glossary/Base-Pair[NHGRI: representing DNA by a sequence of letters].

Order carries information that composition loses. Both ACGTAC and AACCGT contain two <adenine>, two <cytosine>, one <guanine>, and one <thymine> <nucleobase>, but their <nucleic acid sequences> differ at positions 2, 3, 4, 5, and 6. At position 2, for example, the first has <cytosine> and the second <adenine>. Reporting only the four counts cannot reconstruct either ordered record.

To obtain the partner of $5'\text{-}\mathrm{ACGTAC}\text{-}3'$, apply the <DNA> <base pairing> rules position by position: A selects T, C selects G, G selects C, T selects A, A selects T, and C selects G. Alignment gives $3'\text{-}\mathrm{TGCATG}\text{-}5'$. Its opposite end labels matter because the two are <antiparallel nucleic acid strands>. Reading the partner from its own $5'$ end reverses the aligned lettering and yields the <reverse complement>, $5'\text{-}\mathrm{GTACGT}\text{-}3'$.

\Image[/dna-reverse-complement.png]
{title=Complement, then reverse: <DNA> ACGTAC has aligned partner TGCATG and <reverse complement> GTACGT}

Reversal alone gives CATGCA; complementation alone gives aligned TGCATG. Neither operation alone gives the partner written in the usual $5'$-to-$3'$ convention. Applying the <reverse complement> operation twice returns ACGTAC: GTACGT complements to CATGCA, which reverses to ACGTAC. This convention makes a single reported strand sufficient to specify an ideally complementary <DNA> duplex, provided its direction is known.