% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qc.R
\name{flag_qc_plates}
\alias{flag_qc_plates}
\title{Flag plates that fail quality-control thresholds}
\usage{
flag_qc_plates(qc, z_prime_min = 0.4, sb_min = 3, cv_max = 10)
}
\arguments{
\item{qc}{A data frame of plate quality metrics. Columns referenced by the
active thresholds must be present (\code{z_prime}, \code{sb_value} and, if supplied,
\code{cv_negative_ctrl}).}

\item{z_prime_min}{Minimum acceptable Z-prime. Plates below this are flagged
\code{"Bad"}. Default \code{0.4}.}

\item{sb_min}{Minimum acceptable signal-to-background ratio. Default \code{3}.}

\item{cv_max}{Maximum acceptable coefficient of variation (percent) of the
negative control. Only applied when a \code{cv_negative_ctrl} column is present.
Default \code{10}.}
}
\value{
The input data frame with added character flag columns
\code{z_primer_flag}, \code{sb_flag} and (when applicable) \code{cv_flag}, each taking the
value \code{"Bad"} or \code{"Normal"}.
}
\description{
Adds pass/fail flags to a table of plate quality metrics such as the one
produced by \code{\link[=calculate_qc_metrics]{calculate_qc_metrics()}}, using conventional acceptance
thresholds.
}
\examples{
qc <- data.frame(
  plateID = c("P01", "P02"),
  z_prime = c(0.62, 0.20),
  sb_value = c(5.1, 2.4),
  cv_negative_ctrl = c(6, 14)
)
flag_qc_plates(qc)

}
\seealso{
\code{\link[=calculate_qc_metrics]{calculate_qc_metrics()}}
}
