\HeaderA{basecontent}{Obtain the ATCG content of a gene}{basecontent}
\aliasA{countbases}{basecontent}{countbases}
\keyword{manip}{basecontent}
\begin{Description}\relax
WARNING: Both \code{basecontent} and \code{countbases} have been
deprecated in favor of \code{\LinkA{alphabetFrequency}{alphabetFrequency}}.

These functions accept a character vector representing the nucleotide
sequences and compute the frequencies of each base (A, C, G, T).
\end{Description}
\begin{Usage}
\begin{verbatim}
basecontent(seq)
countbases(seq, dna = TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{seq}] Character vector.
\item[\code{dna}] Logical value indicating whether the sequence is DNA
(\code{TRUE}) or RNA (\code{FALSE})
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The base frequencies are calculated separately for
each element of \code{x}.
The elements of \code{x} can be in upper case, lower case
or mixed.
\end{Details}
\begin{Value}
A matrix with 4 columns and \code{length(x)} rows.  The columns are
named \code{A}, \code{C}, \code{T}, \code{G}, and the values in each
column are the counts of the corresponding bases in the elements of
\code{x}.  When \code{dna=FALSE}, the \code{T} column is replaced with
a \code{U} column.
\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}
 v<-c("AAACT", "GGGTT", "ggAtT")

 ## Do not use these functions anymore:
 if (interactive()) {
   basecontent(v)
   countbases(v)
 }

 ## But use more efficient alphabetFrequency() instead:
 v <- DNAStringSet(v)
 alphabetFrequency(v, baseOnly=TRUE)

 ## Comparing efficiencies:
 if (interactive()) {
   library(hgu95av2probe)
   system.time(y1 <- countbases(hgu95av2probe$sequence))
   x <- DNAStringSet(hgu95av2probe)
   system.time(y2 <- alphabetFrequency(x, baseOnly=TRUE))
 }
\end{ExampleCode}
\end{Examples}

