% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/normCytof.R
\docType{methods}
\name{normCytof}
\alias{normCytof}
\alias{normCytof,flowFrame-method}
\alias{normCytof,character-method}
\title{Bead-based normalization}
\usage{
normCytof(x, y, ...)

\S4method{normCytof}{flowFrame}(x, y, out_path = NULL, remove_beads = TRUE,
  norm_to = NULL, k = 500, trim = 5, verbose = TRUE, plot = TRUE)

\S4method{normCytof}{character}(x, y, out_path = NULL, remove_beads = TRUE,
  norm_to = NULL, k = 500, trim = 5, verbose = TRUE)
}
\arguments{
\item{x}{a \code{\link{flowFrame}} or character of the FCS file to be normalized.}

\item{y}{\code{"dvs"} (for bead masses 140, 151, 153, 165, 175) or \code{"beta"} 
(for bead masses 139, 141, 159, 169, 175) or a numeric vector of bead masses.}

\item{...}{optional arguments.}

\item{out_path}{a character string. If specified, outputs will be generated here. If NULL
(the default), \code{normCytof} will return a \code{\link{flowFrame}} of 
the normalized data (if \code{remove=FALSE}) or a \code{\link{flowSet}} 
containing normalized cells and beads (if \code{remove=TRUE}).}

\item{remove_beads}{logical. If TRUE (the default) beads will be removed and 
normalized cells and beads returned separately.}

\item{norm_to}{a \code{\link{flowFrame}} or character of an FCS file from which baseline 
values should be computed and to which the input data should be normalized.}

\item{k}{integer width of the median window used for bead smoothing.}

\item{trim}{a single non-negative numeric. A \emph{median} +/- ... \emph{mad} rule is
applied to the preliminary population of bead events to remove bead-bead 
doublets and low signal beads prior to estimating normalization factors.}

\item{verbose}{logical. Should extra information on progress be reported?}

\item{plot}{logical. Should bead vs. DNA scatters and beads 
before vs. after normalization be plotted?}
}
\value{
if \code{out_path=NULL} (the default) a \code{\link{flowFrame}} of the 
normalized data (if \code{remove=FALSE}) or \code{\link{flowSet}} containing 
normalized cells and beads (if \code{remove=TRUE}). Else, a character of the 
location where output FCS files and plots have been generated.
}
\description{
an implementation of Finck et al.'s normalization of mass cytometry data 
using bead standards with automated bead gating.
}
\examples{
data(raw_data)
ff <- concatFCS(raw_data)
normCytof(x = ff, y = "dvs", k = 120)

}
\references{
Finck, R. et al. (2013).
Normalization of mass cytometry data with bead standards.
\emph{Cytometry A} \bold{83A}, 483-494.
}
\author{
Helena Lucia Crowell \email{crowellh@student.ethz.ch}
}
