\HeaderA{autoGate}{Automated gating of single populations in 2D}{autoGate}
\keyword{misc}{autoGate}
\begin{Description}\relax
This function tries to fit a single norm2Filter based on a rough
preselection of the data. This function is considered internal. Please
use the API provided by \code{\LinkA{lymphGate}{lymphGate}}.
\end{Description}
\begin{Usage}
\begin{verbatim}
autoGate(x, ..., scale = 2.5)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] An object of class \code{\LinkA{flowSet}{flowSet}}
\item[\code{...}] Named arguments or a list of the ranges used for the
initial rough preselection. This gets passed on to
\code{\LinkA{rectangleGate}{rectangleGate}}, see it's documentation for
details. 
\item[\code{scale}] The \code{scale} parameter that gets passed on to
\code{\LinkA{norm2Filter}{norm2Filter}}. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The \code{flowSet} is first filtered using a \code{rectangleGate} and
the \code{norm2Filter} is subsequently fitted to the remaining subset.
\end{Details}
\begin{Value}
A list with items:

\begin{ldescription}
\item[\code{x }] The filtered \code{flowSet}. 
\item[\code{n2gate }] The \code{norm2Filter} object. 
\item[\code{n2gateResults }] The \code{\LinkA{filterResult}{filterResult}} after
applying the \code{norm2Filter} on the \code{flowSet}. 
\end{ldescription}
\end{Value}
\begin{Author}\relax
Florian Hahne
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{lymphGate}{lymphGate}}, \code{\LinkA{norm2Filter}{norm2Filter}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

data(GvHD)
flowStats:::autoGate(GvHD[10:15], "FSC-H"=c(100,500), "SSC-H"=c(0, 400))

\end{ExampleCode}
\end{Examples}

