\HeaderA{IUPAC\_CODE\_MAP}{The IUPAC Extended Genetic Alphabet}{IUPAC.Rul.CODE.Rul.MAP}
\aliasA{mergeIUPACLetters}{IUPAC\_CODE\_MAP}{mergeIUPACLetters}
\keyword{utilities}{IUPAC\_CODE\_MAP}
\keyword{data}{IUPAC\_CODE\_MAP}
\begin{Description}\relax
The \code{IUPAC\_CODE\_MAP} named character vector contains the mapping from
the IUPAC nucleotide ambiguity codes to their meaning.

The \code{mergeIUPACLetters} function provides the reverse mapping.
\end{Description}
\begin{Usage}
\begin{verbatim}
    IUPAC_CODE_MAP
    mergeIUPACLetters(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] A vector of non-empty character strings made of IUPAC letters.

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
IUPAC nucleotide ambiguity codes are used for representing
sequences of nucleotides where the exact nucleotides that occur
at some given positions are not known with certainty.
\end{Details}
\begin{Value}
\code{IUPAC\_CODE\_MAP} is a named character vector where the names are
the IUPAC nucleotide ambiguity codes and the values are their corresponding
meanings. The meaning of each code is described by a string that enumarates
the base letters (\code{"A"}, \code{"C"}, \code{"G"} or \code{"T"})
associated with the code.

The value returned by \code{mergeIUPACLetters} is an unnamed character
vector of the same length as its argument \code{x} where each element
is an IUPAC nucleotide ambiguity code.
\end{Value}
\begin{Author}\relax
H. Pages
\end{Author}
\begin{References}\relax
\url{http://www.chick.manchester.ac.uk/SiteSeer/IUPAC\_codes.html}

IUPAC-IUB SYMBOLS FOR NUCLEOTIDE NOMENCLATURE:
Cornish-Bowden (1985) \emph{Nucl. Acids Res.} 13: 3021-3030.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{DNAString}{DNAString}}, \code{\LinkA{RNAString}{RNAString}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  IUPAC_CODE_MAP
  some_iupac_codes <- c("R", "M", "G", "N", "V")
  IUPAC_CODE_MAP[some_iupac_codes]
  mergeIUPACLetters(IUPAC_CODE_MAP[some_iupac_codes])

  mergeIUPACLetters(c("Ca", "Acc", "aA", "MAAmC", "gM", "AB", "bS", "mk"))
\end{ExampleCode}
\end{Examples}

