\HeaderA{reverseSeq}{Reverse Sequence}{reverseSeq}
\aliasA{revcompDNA}{reverseSeq}{revcompDNA}
\aliasA{revcompRNA}{reverseSeq}{revcompRNA}
\keyword{manip}{reverseSeq}
\begin{Description}\relax
WARNING: The functions described in this man page have been deprecated
in favor of \code{\LinkA{reverse,XString-method}{reverse,XString.Rdash.method}} and \code{\LinkA{reverseComplement}{reverseComplement}}.

Functions to obtain the reverse and reverse complement of a sequence
\end{Description}
\begin{Usage}
\begin{verbatim}
reverseSeq(seq)
revcompDNA(seq)
revcompRNA(seq)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{seq}] Character vector.  For \code{revcompRNA} and
\code{revcompDNA} the sequence should consist of appropriate letter
codes: \code{[ACGUN]} and \code{ACGTN}, respectively.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The function reverses the order of the constituent
character strings of its argument.
\end{Details}
\begin{Value}
A character vector of the same length as \code{seq}.
\end{Value}
\begin{Author}\relax
R. Gentleman, W. Huber, S. Falcon
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{alphabetFrequency}{alphabetFrequency}}, \code{\LinkA{reverseComplement}{reverseComplement}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
 w <-  c("hey there", "you silly fool")
 if (interactive()) {
   reverseSeq(w)  # deprecated (inefficient on large vectors)
 }
 reverse(BStringSet(w))  # more efficient

 w <- "able was I ere I saw Elba"
 if (interactive()) {
   reverseSeq(w)  # deprecated (inefficient on large vectors)
 }
 reverse(BStringSet(w))  # more efficient

 rna1 <- "UGCA"
 if (interactive()) {
   revcompRNA(rna1)  # deprecated (inefficient on large vectors)
 }
 reverseComplement(RNAString(rna1))  # more efficient

 dna1 <- "TGCA"
 if (interactive()) {
   revcompDNA(dna1)  # deprecated (inefficient on large vectors)
 }
 reverseComplement(DNAString(dna1))  # more efficient

 ## Comparing efficiencies:
 if (interactive()) {
   library(hgu95av2probe)
   system.time(y1 <- reverseSeq(hgu95av2probe$sequence))
   x <- DNAStringSet(hgu95av2probe)
   system.time(y2 <- reverse(x))

   system.time(y3 <- revcompDNA(hgu95av2probe$sequence))
   system.time(y4 <- reverseComplement(x))
 }
\end{ExampleCode}
\end{Examples}

