% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module1_preqc.R
\name{calc_well_zscore}
\alias{calc_well_zscore}
\title{Per-well standard and robust Z-scores}
\usage{
calc_well_zscore(
  hts_raw,
  signal_col = "signal",
  reference = c("compound", "negative", "all"),
  nc_label = "NC",
  sample_label = "compound"
)
}
\arguments{
\item{hts_raw}{An \code{hts_raw} object.}

\item{signal_col}{Name of the signal column. Default \code{"signal"}.}

\item{reference}{One of \code{"compound"}, \code{"negative"} or \code{"all"}, selecting the
per-plate population that defines the centre and spread. Default
\code{"compound"}.}

\item{nc_label, sample_label}{Well-type labels for the negative controls and
test wells, used to pick the reference population.}
}
\value{
The input object with two added columns: \code{zscore} (mean/SD based) and
\code{robust_zscore} (median/MAD based, MAD scaled to the normal distribution).
}
\description{
Standardises every well's signal within its plate, adding both a classic
\strong{Z-score} (mean/SD based) and a \strong{robust Z-score} (median/MAD based, which
is the preferred choice in HTS because it is not distorted by the very hits
the screen is looking for). Scores are computed against a per-plate reference
population, by default the test-compound wells.
}
\examples{
raw <- read_hts_plate(hts_primary_raw)
scored <- calc_well_zscore(raw)
head(scored[, c("plate_id", "well", "zscore", "robust_zscore")])

}
\seealso{
\code{\link[=calc_plate_qc]{calc_plate_qc()}}, \code{\link[=plot_plate_qc]{plot_plate_qc()}}
}
