\HeaderA{maSelectGnames}{Select genes according to the values of a few different statistics}{maSelectGnames}
\keyword{manip}{maSelectGnames}
\begin{Description}\relax
Select genes by considering the \code{\LinkA{union}{union}} or
\code{\LinkA{intersect}{intersect}} of multiple statistics.
\end{Description}
\begin{Usage}
\begin{verbatim}
maSelectGnames(statdata, crit1 = 50, crit2 = crit1, sub = TRUE, selectstat, operate = c("intersect", "union"))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{statdata}] A numerical matrix where the rows corresponds to genes
and the columns corresponds to various statistics corresponding to a
particular gene.
\item[\code{crit1}] The number of points to be selected.
If crit1 < 1, the crit1*100\% spots with the smallest M values
will be selected. If crit1 >= 1, the crit spots  with the
smallest M values are selected.
\item[\code{crit2}] Similar to "crit1".   If crit2 < 1, the crit2*100\%
spots with the largest M values will be selected. If crit2 >= 1,
the crit2 spots with the largest M values are selected.
\item[\code{sub}] A "logical" or "numeric" vector indicating the subset of
genes to be consider.
\item[\code{selectstat}] A integer value indicating the statistics where the
final ranking is based on.
\item[\code{operate}] The operation used to combined different rankings
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This functions calls \code{\LinkA{stat.gnames}{stat.gnames}} to select say the 100
most extreme genes from various statistics and combined the different
gene lists by either union or intersection.
\end{Details}
\begin{Value}
A vector of numeric values.
\end{Value}
\begin{Author}\relax
Jean Yee Hwa Yang
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{stat.gnames}{stat.gnames}}, \code{\LinkA{order}{order}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
X <- matrix(rnorm(1000), 100,10)
Xstat <- cbind(mean=apply(X, 1, mean, na.rm=TRUE),
               var=apply(X, 1, var, na.rm=TRUE))
maSelectGnames(Xstat, crit1=50)
\end{ExampleCode}
\end{Examples}


