\name{gateView-class}

\docType{class}
\alias{gateView-class}
\alias{gateView}
\alias{Rm,gateView,workFlow,character-method}
\alias{summary,gateView-method}
\alias{xyplot,formula,gateView-method}

\title{Class "gateView"}

\description{

  Class and method to capture the result of gating operations in a flow
  cytometry workflow.
  
}


\section{Objects from the Class}{

  Objects should be created using the \code{add} method, which creates a
  \code{gateView} from a \code{\link{filter}} object and directly
  assigns it to a \code{\link{workFlow}}. Alternatively, one can use the
  \code{gateView} constructor function for more programmatic access.
}

\section{Slots}{
  
  \describe{
    
    \item{\code{indices}:}{Object of class \code{"logical"}. The indices
      in the parent data for events that are within the filter.}
    
    \item{\code{filterResult}:}{Object of class
      \code{"fcFilterResultReference"}. A reference to the outcome of
      the filtering operation. }
    
    \item{\code{frEntry}:}{Object of class \code{"character"} The
      population in the \code{\link{filterResult}} that corrsponds to the
      current view. See details for further explanation. }

    \item{\code{ID}:}{Object of class \code{"character"}. A unique
      identifier for the view. }
    
    \item{\code{name}:}{Object of class \code{"character"}. A more
      human-readable name}
    
    \item{\code{action}:}{Object of class \code{"fcActionReference"}. A
      reference to the
      \code{\link[flowCore:actionItem-class]{actionItem}} that generated
      the view. } 

    \item{\code{env}:}{Object of class \code{"environment"}. The
      evaluation environment in the
      \code{\link[flowCore:workFlow-class]{workFlow}}. } 
    
    \item{\code{data}:}{Object of class \code{"fcDataReference"} A
      reference to the data that is associated to the view. Subsets of
      the data are only generated when a a further action is invoced on
      a particular \code{gateView}. Summary statistics about the view
      can be acquired through the usual process of summarizing
      \code{\link[flowCore:filterResult-class]{filterResults}}. }
    
  }
}

\section{Extends}{
  
  Class \code{"\linkS4class{view}"}, directly.
  
}


\usage{

gateView(workflow, ID=paste("gateViewRef", guid(), sep="_"),
                     name="default", action, data, indices, 
                     filterResult, frEntry)

}

\arguments{

  \item{workflow}{ An object of class \code{\link{workFlow}} for which a
    view is to be created. }

  \item{ID}{ A unique identifier of the view, most likely created by
    using the internal \code{guid} function. }

  \item{name}{ A more human-readable name of the view. }
  
  \item{data, action, filterResult}{ References to the data,
    \code{\link{filterResult}}, and
    \code{\link[flowCore:actionItem-class]{actionItem}} objects, respectively.}

  \item{indices}{ A logical vector of indices in the parent data. }

  \item{frEntry}{ A character vector indicating the name of the
    population in the \code{\link{filterResult}}. }
  
}

\value{

  A reference to the \code{gateView} that is created inside the
  \code{\link{workFlow}} environment as a side effect of calling the
  \code{add} method.

  A \code{gateView} object for the constructor.
  
}


\section{Methods}{
  
  \describe{
    
    \item{Rm}{\code{signature(symbol = "gateView", envir = "workFlow",
	subSymbol = "character")}: Remove a \code{gateView} from a
      \code{\link{workFlow}}. This method is recursive and will also
      remove all dependent \code{views} and
      \code{\link[flowCore:actionItem-class]{actionItem}}s.  }

    \item{summary}{\code{signature(x = "formula", data = "gateView")}:
      Summarize the gating operation. }
    
    \item{xyplot}{\code{signature(x = "formula", data = "gateView")}:
      Plot the data of the \code{gateView} along with the gate. }

  }
  
}

\details{

  \code{gateViews} provide a means to bind the results of gating
  operations in a workflow. Each \code{gateView} represents one of the
  populations that arise from the
  gating. \code{\link[flowCore:logicalFilterResult-class]{logicalFilterResults}}
  create two \code{gateViews} (events in the gate and events not in the
  gate),
  \code{\link[flowCore:multipleFilterResult-class]{multipleFilterResults}} 
  one \code{view} for each population. See the documentation of the
  parent class \code{\link{view}} for more details.
  
}

\author{ Florian Hahne }

\seealso{
	
  \code{\linkS4class{workFlow}},
  \code{\linkS4class{view}},
  \code{\linkS4class{transformView}},
  \code{\linkS4class{compensateView}},
  \code{\linkS4class{actionItem}}
  
}

\examples{
showClass("view")
}

\keyword{classes}