\name{qaProcess.marginevents} \alias{qaProcess.marginevents} \title{ Create QA process of type 'marginevents' } \description{ This function takes a \code{\link[flowCore:flowSet-class]{flowSet}} as input and creates all necessary output for a 'marginevents' type QA process. Objects created by this function can be laid out as HTML using \code{\link[flowQ]{writeQAReport}}. } \usage{ qaProcess.marginevents(set, channels=NULL,side ="both", grouping=NULL, outdir, cFactor=2, absolute.value=NULL, name="margin events", sum.dimensions=NULL, det.dimensions=c(3,1), pdf=TRUE, \dots) } \arguments{ \item{set}{ A \code{\link[flowCore:flowSet-class]{flowSet}}.} \item{channels}{ A character vector of channel names for which margin events are to be recorded. Will use all available channels except for the time channel if \code{NULL}. } \item{side}{Object of class \code{"character"}. The margin on which to evaluate the filter. Either \code{upper} for the upper margin or \code{lower} for the lower margin or \code{both} for both margins. } \item{grouping}{ A character vector defining one of the variables in the phenoData of \code{set} used as a grouping variable. If this argument is used and if \code{absolute.value} is \code{NULL}, outlier detection will be performed within groups rather than across all samples.} \item{outdir}{ The directory to which the graphical output is to be saved. If multiple QA processes are to be combined, make sure to use the same directory for all of them.} \item{cFactor}{ The outlier threshold at which the QA criterion is considered to have failed. This is essentially the factor of standard deviations away from the average number of cells per sample for the respective channel.} \item{absolute.value}{ An absolute percentage of margin events below which the QA criterion is considered to be failed. If this argument is not \code{NULL}, \code{cFactor} is ignored.} \item{name}{ The name of the process used for the headings in the HTML output.} \item{sum.dimensions}{The dimensions of summary plot generated in inches, default is NULL where the dimensions are automatically selected} \item{det.dimensions}{the dimensions of each sub image generated by the QA process in inches.} \item{pdf}{ Logical indicating whether to create vectorized versions of images for this quality process. This should be set to \code{FALSE} if disk space is critical, since the pdf versions of the image consume much more space on the hard drive compared to the bitmap version. Setting the argument to \code{FALSE} will also speed up the process.} \item{\dots}{Further arguments.} } \details{ QA processes of type 'marginevents' record the number of events that fall on the margins of the measurement range for each channel. Unproportionally high numbers of such events can indicate problems with the instrument settings or with compensation. These are either determined dynamically as outliers from the typical distribution of margin event percentages for the whole set, or, if \code{absolute.value} is not \code{NULL}, by an absolute cutoff value. If there is a natural grouping among the samples, this can be specified using the \code{grouping} argument. In this case, the outlier detection will be performed within its respective group for a particular sample. For more details on how to layout \code{\link[flowQ:qaProcess-class]{qaProcess}} objects to HTML, see \code{\link[flowQ]{writeQAReport}} and \code{\link[flowQ]{qaReport}}. } \value{ An object of class \code{\link[flowQ:qaProcess-class]{qaProcess}}. } \author{ Florian Hahne } \seealso{ \code{\link[flowQ]{writeQAReport}}, \code{\link[flowQ]{qaReport}}, \code{\link[flowQ:qaProcess-class]{qaProcess}}, \code{\link[flowQ]{qaProcess.timeline}}, \code{\link[flowQ]{qaProcess.timeflow}}, \code{\link[flowQ]{qaProcess.cellnumber}} } \examples{ \dontrun{ data(GvHD) dest <- tempdir() qp <- qaProcess.marginevents(GvHD, channels=c("FSC-H", "SSC-H"), outdir=dest) qp } } \keyword{ dynamic }