% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module6_auc_matrix.R
\name{build_auc_matrix}
\alias{build_auc_matrix}
\title{Build a compound-by-sample AUC matrix}
\usage{
build_auc_matrix(
  data,
  row_col = "compound_id",
  col_col = "cell_line",
  value_col = "auc",
  zscore = c("none", "row", "column")
)
}
\arguments{
\item{data}{A data frame with compound, sample and AUC columns (typically
\code{drc$meta} after \code{\link[=calc_drc_auc]{calc_drc_auc()}}).}

\item{row_col}{Compound column. Default \code{"compound_id"}.}

\item{col_col}{Sample column. Default \code{"cell_line"}.}

\item{value_col}{AUC column. Default \code{"auc"}.}

\item{zscore}{Standardisation: \code{"none"} (default), \code{"row"} or \code{"column"}.}
}
\value{
A numeric matrix (compounds x samples). The standardisation used is
stored in \code{attr(x, "zscore")}.
}
\description{
Reshapes long AUC results into a numeric matrix with compounds as rows and
samples (for example cell lines or batches) as columns, optionally
standardised to Z-scores for comparability.
}
\examples{
\donttest{
drc <- calc_drc_auc(fit_4pl_curve(import_dose_response(hts_dose_response,
  response_col = "viability", group_cols = "cell_line"),
  group_cols = "cell_line"))
build_auc_matrix(drc$meta)
}

}
\seealso{
\code{\link[=cluster_auc_matrix]{cluster_auc_matrix()}}, \code{\link[=plot_auc_heatmap]{plot_auc_heatmap()}}
}
