\HeaderA{VRC.HVTNFCS}{Sequential Gating Scheme from Vaccine Research Center
(VRC), NIH, Bethesda, MD; Mario Roederer, PhD}{VRC.HVTNFCS}
\keyword{iplot}{VRC.HVTNFCS}
\begin{Description}\relax
This function uses \code{\LinkA{icreateGate}{icreateGate}} and \code{\LinkA{createGate}{createGate}} to
select the datapoints which are of particular interest.  The selection
process is realized in an index column which is added to the data of
the FCS object.  In particular, after a series of gating/datapoint
selection sequences, the interferon gamma variable is of interest.

To row reduce the data of the FCS object, the function,
\code{\LinkA{extractGatedData}{extractGatedData}} should be used on the last gate index to
obtain the rows/cells and then should be used again to subset
across columns to obtain the gamma interferon column.
\end{Description}
\begin{Usage}
\begin{verbatim}

VRC.HVTNFCS(myFCSobj, gate1.vars = c(1, 2), gate2.vars = c(7, 5),
                 gate3.vars = c(5, 3),MY.DEBUG = FALSE)

\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{myFCSobj}] a FCS object
\item[\code{gate1.vars}] The vector of column variable positions
corresponding to Forward Scatter and Side Scatter variables for the
first gate; default
is column positions 1 and 2 respectively
\item[\code{gate2.vars}] The vector of column variable positions
corresponding to cd3 and cd4 variables for the
second gate; default is column positions 7 and 5 respectively
\item[\code{gate3.vars}] The vector of column variable positions
corresponding to cd4 and cd8 variables for gate 3;
default is column positions 5 and 3 respectively
\item[\code{MY.DEBUG}] if TRUE, then will print the debugging statements;
otherwise, if FALSE, then will surpress the debugging statements;
default is FALSE
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The Selection Sequence proposed by Mario Roederer is the following:

\item[\bold{gate1:bipcut:}] Forward Scatter VS Side Scatter
(Select the lymphocytes--central cluster) 

\item[\bold{gate2:bidcut:}] cd3 VS cd4 (want cd3+ cells)
(Select the cd3 positive cells on the right of the cutoff)

\item[\bold{gate3:biscut:}] cd4 vs cd8 
gate 3.1: (Select cd4+/cd8- cells)  (+/- quadrant)
gate 3.2: (Select cd4-/cd8+ cells)  (-/+ quadrant)

In General, Types of Gating/Cutting:

\item[uniscut = univariate single cut] (Selection of the positive/right half)

\item[biscut = bivariate single cut] (Selection of the +/-, -/-. +/+, or -/+ quadrant)

\item[bidcut = bivariate double cut] (Selection of the center rectangle
that results)
\end{Details}
\begin{Value}
\begin{ldescription}
\item[\code{FCS object}] with the following slots:
\item[\code{data}] A augmented dataframe with the added-on gating column variables/indices
\item[\code{metadata}] a FCSmetadata object with the information about the
gating column variables: \$PnR (gating range), \$PnN
(gating variable's shortname/unused name in the data of the FCS
object), \$PnS (gating variable's longname/used name), and other slot information
\end{ldescription}
\end{Value}
\begin{Section}{WARNING}
This gating scheme is not standard, and there may
have been changes to the gating scheme.  This gating scheme only
serves as an example, which demonstrates the use of
\code{\LinkA{createGate}{createGate}},\code{\LinkA{icreateGate}{icreateGate}}
and \code{\LinkA{extractGateHistory}{extractGateHistory}} which extracts the gating information
(eg. in order to obtain information about a previous gating
index/column variable)
\end{Section}
\begin{Note}\relax
The "VRC" data from the "rfcdorig" package can be used for this sequential
gating scheme.
\end{Note}
\begin{Author}\relax
A.J. Rossini \& J.Y. Wan
\end{Author}
\begin{References}\relax
Mario Roederer, PhD
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{createGate}{createGate}}, \code{\LinkA{icreateGate}{icreateGate}},
\code{\LinkA{FHCRC.HVTNFCS}{FHCRC.HVTNFCS}}, \code{\LinkA{plotvar.FCS}{plotvar.FCS}},
\code{\LinkA{extractGatedData}{extractGatedData}}, \code{\LinkA{extractGateHistory}{extractGateHistory}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

if (require(rfcdmin)){

data.there<-is.element(c("st.1829", "unst.1829", "st.DRT", "unst.DRT"),objects())
if ( ( sum(data.there) != length(data.there) )){
## obtaining the FCS objects from VRC data
data(VRCmin)
}



# HIV positive individual
if (interactive()==TRUE){
par(mfrow=c(4,2))
st.DRT.VRC<-VRC.HVTNFCS(st.DRT)
}

}
\end{ExampleCode}
\end{Examples}

