% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module7_report.R
\name{plot_primary_secondary_cor}
\alias{plot_primary_secondary_cor}
\title{Primary versus secondary activity correlation}
\usage{
plot_primary_secondary_cor(
  primary,
  secondary,
  by = "compound_id",
  primary_col = "activity",
  secondary_col = "auc"
)
}
\arguments{
\item{primary}{A data frame with a compound column and a primary-activity
column.}

\item{secondary}{A data frame with a compound column and a secondary-activity
(AUC) column.}

\item{by}{Join key. Default \code{"compound_id"}.}

\item{primary_col}{Primary-activity column. Default \code{"activity"}.}

\item{secondary_col}{Secondary-activity column. Default \code{"auc"}.}
}
\value{
A \link[ggplot2:ggplot]{ggplot2::ggplot} object.
}
\description{
Scatter of primary-screen activity against secondary-screen AUC for the same
compounds, the standard check that primary hits reproduce in the dose-response
confirmation screen.
}
\examples{
norm <- norm_by_control(baseline_subtract(read_hts_plate(hts_primary_raw)))
primary <- select_primary_hit(norm)
drc <- calc_drc_auc(fit_4pl_curve(import_dose_response(hts_dose_response,
  response_col = "viability", group_cols = "cell_line"),
  group_cols = "cell_line"))
sec <- aggregate(auc ~ compound_id, drc$meta, mean)
plot_primary_secondary_cor(primary, sec)

}
\seealso{
\code{\link[=select_primary_hit]{select_primary_hit()}}, \code{\link[=calc_drc_auc]{calc_drc_auc()}}
}
