\HeaderA{coerce-method}{Coerce a maiges object to classes defined by packages limma and marray}{coerce.Rdash.method}
\aliasA{as}{coerce-method}{as}
\aliasA{as,maiges,MAList-method}{coerce-method}{as,maiges,MAList.Rdash.method}
\aliasA{as,maiges,marrayNorm-method}{coerce-method}{as,maiges,marrayNorm.Rdash.method}
\aliasA{as,maigesRaw,marrayRaw-method}{coerce-method}{as,maigesRaw,marrayRaw.Rdash.method}
\aliasA{as,maigesRaw,RGList-method}{coerce-method}{as,maigesRaw,RGList.Rdash.method}
\aliasA{as,MAList,maiges-method}{coerce-method}{as,MAList,maiges.Rdash.method}
\aliasA{as,marrayNorm,maiges-method}{coerce-method}{as,marrayNorm,maiges.Rdash.method}
\aliasA{as,marrayRaw,maigesRaw-method}{coerce-method}{as,marrayRaw,maigesRaw.Rdash.method}
\aliasA{as,RGList,maigesRaw-method}{coerce-method}{as,RGList,maigesRaw.Rdash.method}
\aliasA{coerce,maiges,MAList-method}{coerce-method}{coerce,maiges,MAList.Rdash.method}
\aliasA{coerce,maiges,marrayNorm-method}{coerce-method}{coerce,maiges,marrayNorm.Rdash.method}
\aliasA{coerce,maigesRaw,marrayRaw-method}{coerce-method}{coerce,maigesRaw,marrayRaw.Rdash.method}
\aliasA{coerce,maigesRaw,RGList-method}{coerce-method}{coerce,maigesRaw,RGList.Rdash.method}
\aliasA{coerce,MAList,maiges-method}{coerce-method}{coerce,MAList,maiges.Rdash.method}
\aliasA{coerce,marrayNorm,maiges-method}{coerce-method}{coerce,marrayNorm,maiges.Rdash.method}
\aliasA{coerce,marrayRaw,maigesRaw-method}{coerce-method}{coerce,marrayRaw,maigesRaw.Rdash.method}
\aliasA{coerce,RGList,maigesRaw-method}{coerce-method}{coerce,RGList,maigesRaw.Rdash.method}
\keyword{methods}{coerce-method}
\begin{Description}\relax
Coercing methods were defined to convert maiges objects of classes
\code{\LinkA{maiges}{maiges}} and \code{\LinkA{maigesRaw}{maigesRaw}} into objects of classes
\code{\LinkA{marrayNorm}{marrayNorm}} and \code{\LinkA{marrayRaw}{marrayRaw}}
from package \emph{marray} or classes \code{\LinkA{MAList}{MAList}} and
\code{\LinkA{RGList}{RGList}} from package \emph{limma} and vice-versa.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S4 method for signature 'maiges, marrayNorm':
as(from, to)

## S4 method for signature 'marrayNorm, maiges':
as(from, to)

## S4 method for signature 'maiges, MAList':
as(from, to)

## S4 method for signature 'MAList, maiges':
as(from, to)

## S4 method for signature 'maigesRaw, marrayRaw':
as(from, to)

## S4 method for signature 'marrayRaw, maigesRaw':
as(from, to)

## S4 method for signature 'maigesRaw, RGList':
as(from, to)

## S4 method for signature 'RGList, maigesRaw':
as(from, to)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{from}] object of class \code{\LinkA{maiges}{maiges}},
\code{\LinkA{maigesRaw}{maigesRaw}}, \code{\LinkA{MAList}{MAList}},
\code{\LinkA{RGList}{RGList}}, \code{\LinkA{marrayNorm}{marrayNorm}} or
\code{\LinkA{marrayRaw}{marrayRaw}}.
\item[\code{to}] character string specifying the class of object to which the
object \code{from} will be coerced
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
When converting from objects of classes \code{\LinkA{RGList}{RGList}} or
\code{\LinkA{marrayRaw}{marrayRaw}} to class \code{\LinkA{maigesRaw}{maigesRaw}}, the
slot \code{Sf} and \code{Sb} will always receive the channel 2 (red)
values, and \code{Rf} and \code{Rb} will always receive channel 1
(green) values. For the normalized ojects, the slot \code{W} will be
equivalent to the M values.

When converting from objects of classes \code{\LinkA{maigesRaw}{maigesRaw}} or
\code{\LinkA{maiges}{maiges}} to classes \code{\LinkA{RGList}{RGList}},
\code{\LinkA{marrayRaw}{marrayRaw}},
\code{\LinkA{MAList}{MAList}} or
\code{\LinkA{marrayNorm}{marrayNorm}} the correct values
of the two channels or of M values are calculated.
\end{Details}
\begin{Section}{Methods}
\describe{
\item[from = maiges, to = marrayNorm] convert an object of class
\code{\LinkA{maiges}{maiges}} into an object of class \code{\LinkA{marrayNorm}{marrayNorm}}. 
\item[from = marrayNorm, to = maiges] convert an object of class
\code{\LinkA{marrayNorm}{marrayNorm}} into an object of class \code{\LinkA{maiges}{maiges}}. 
\item[from = maiges, to = MAList] convert an object of class
\code{\LinkA{maiges}{maiges}} into an object of class \code{\LinkA{MAList}{MAList}}. 
\item[from = MAList, to = maiges] convert an object of class
\code{\LinkA{MAList}{MAList}} into an object of class \code{\LinkA{maiges}{maiges}}. 
\item[from = maigesRaw, to = marrayRaw] convert an object of class
\code{\LinkA{maigesRaw}{maigesRaw}} into an object of class \code{\LinkA{marrayRaw}{marrayRaw}}. 
\item[from = marrayRaw, to = maigesRaw] convert an object of class
\code{\LinkA{marrayRaw}{marrayRaw}} into an object of class \code{\LinkA{maigesRaw}{maigesRaw}}. 
\item[from = maigesRaw, to = RGList] convert an object of class
\code{\LinkA{maigesRaw}{maigesRaw}} into an object of class \code{\LinkA{RGList}{RGList}}. 
\item[from = RGList, to = maigesRaw] convert an object of class
\code{\LinkA{RGList}{RGList}} into an object of class \code{\LinkA{maigesRaw}{maigesRaw}}. 
}
\end{Section}
\begin{Note}\relax
It is possible to use Package \emph{convert} to convert objects between
classes defined in packages \emph{limma}, \emph{marray} and \emph{Biobase}.
\end{Note}
\begin{SeeAlso}\relax
\code{\LinkA{as}{as}} in the \emph{methods} package.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Loading the dataset
data(gastro)

## Converting a maigesRaw class object into marrayRaw object
as(gastro.raw, "marrayRaw")

## Converting a maigesRaw class object into RGList
as(gastro.raw, "RGList")

## Converting a maiges class object into marrayNorm object
as(gastro.norm, "marrayNorm")

## Converting a maiges class object into MAList object
as(gastro.summ, "MAList")
\end{ExampleCode}
\end{Examples}

