\HeaderA{sage.utilities}{Utilities}{sage.utilities}
\aliasA{create.matrix.csr}{sage.utilities}{create.matrix.csr}
\aliasA{difference.scatter.plot}{sage.utilities}{difference.scatter.plot}
\aliasA{revcomp}{sage.utilities}{revcomp}
\aliasA{table.sparse}{sage.utilities}{table.sparse}
\aliasA{tagmatrix2tagnum}{sage.utilities}{tagmatrix2tagnum}
\aliasA{tagnum2tagmatrix}{sage.utilities}{tagnum2tagmatrix}
\aliasA{tagnum2tagsequence}{sage.utilities}{tagnum2tagsequence}
\aliasA{tagsequence2tagnum}{sage.utilities}{tagsequence2tagnum}
\keyword{utilities}{sage.utilities}
\begin{Description}\relax
Different utilities to use with SAGE data.
\end{Description}
\begin{Usage}
\begin{verbatim}
tagnum2tagmatrix(tags, length)
tagmatrix2tagnum(tags, length=ncol(tags))
tagnum2tagsequence(tags, length)
tagsequence2tagnum(tags, length)
revcomp(seq)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{tags}] integer or character vector giving SAGE tags.
\item[\code{length}] Length of SAGE tags.
\item[\code{seq}] Character vector or list of sequences.
\item[\code{...}] SAGE library objects.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
These functions are utility functions used in SAGE tag extraction,
e.g. to convert SAGE tag sequences to numeric values, i.e. base 4 for
efficient storage and handling, and to reverse complement sequences.
\end{Details}
\begin{Author}\relax
Tim Beissbarth
\end{Author}
\begin{Examples}
\begin{ExampleCode}
library(sagenhaft)
tags <- c("aaa", "ttt", "ccc")
tagsnumeric <- tagsequence2tagnum(tags, 3)
tagsmatrix <- tagnum2tagmatrix(tagsnumeric, 3)
tags <- tagnum2tagsequence(tagmatrix2tagnum(tagsmatrix, 3), 3)
revcomp(tags)
\end{ExampleCode}
\end{Examples}

