\HeaderA{inverseVST}{Inverse VST transform}{inverseVST}
\keyword{methods}{inverseVST}
\begin{Description}\relax
Inverse transform of VST (variance stabilizing transform), see \code{\LinkA{vst}{vst}}.
\end{Description}
\begin{Usage}
\begin{verbatim}
inverseVST(x, fun = c('asinh', 'log'), parameter)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a VST transformed LumiBatch object or a numeric matrix or vector
\item[\code{fun}] function used in VST transform 
\item[\code{parameter}] parameter of VST function 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Recover the raw data from VST transformed data returned by \code{\LinkA{vst}{vst}}.
This function can be directly applied to the VST transformed or VST + RSN normalized LumiBatch object to reverse transform the data to the original scale.
\end{Details}
\begin{Value}
Return the raw data before VST transform
\end{Value}
\begin{Author}\relax
Pan Du
\end{Author}
\begin{References}\relax
Lin, S.M., Du, P., Kibbe, W.A.,  "Model-based Variance-stabilizing Transformation for Illumina Mi-croarray Data", submitted
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{vst}{vst}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

## load example data
data(example.lumi)

## get the gene expression mean for one chip
u <- exprs(example.lumi)[,1]
## get the gene standard deviation for one chip
std <- se.exprs(example.lumi)[,1]

## do variance stabilizing transform
transformedU <- vst(u, std)

## do inverse transform and recover the raw data
parameter <- attr(transformedU, 'parameter')
transformFun <- attr(transformedU, 'transformFun')
recoveredU <- inverseVST(transformedU, fun=transformFun, parameter=parameter)

## compare with the raw data
print(u[1:5])
print(recoveredU[1:5])

## do inverse transform of the VST + RSN processed data
lumi.N <- lumiExpresso(example.lumi[,1:2])
## Inverse transform. 
## Note: as the normalization is involved, the processed data will be different from the raw data.
lumi.N.raw <- inverseVST(lumi.N)

\end{ExampleCode}
\end{Examples}

