% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module7_report.R
\name{rank_hit_compound}
\alias{rank_hit_compound}
\title{Rank and stratify hit compounds}
\usage{
rank_hit_compound(
  data,
  auc_col = "auc",
  ic50_col = "ic50",
  emax_col = "emax",
  cv_col = "cv",
  rsq_col = "rsq",
  weights = NULL,
  probs = c(1/3, 2/3)
)
}
\arguments{
\item{data}{A per-compound data frame of metrics.}

\item{auc_col, ic50_col, emax_col, cv_col, rsq_col}{Column names for the metrics
to use; set any to \code{NULL} to omit it. Metrics absent from \code{data} are
silently skipped.}

\item{weights}{Optional named numeric vector of per-metric weights (names
matching the metric column names). Defaults to equal weights.}

\item{probs}{Two increasing probabilities splitting Weak/Moderate/Strong by
score quantile. Default \code{c(1/3, 2/3)}.}
}
\value{
\code{data} with added \code{score} (numeric) and \code{tier} (ordered factor
Weak < Moderate < Strong), sorted by descending score.
}
\description{
Combines potency, efficacy and quality metrics into a single activity score
and assigns each compound to a Strong, Moderate or Weak tier, the final
prioritisation step of the pipeline. Lower AUC and IC50 and higher Emax count
as more active; lower replicate CV and higher fit \eqn{R^2} raise confidence.
}
\examples{
drc <- calc_drc_auc(fit_4pl_curve(import_dose_response(hts_dose_response,
  response_col = "viability", group_cols = "cell_line"),
  group_cols = "cell_line"))
params <- merge(extract_drc_params(drc), drc$meta[, c("curve_id", "auc")])
ranked <- rank_hit_compound(params)
table(ranked$tier)

}
\seealso{
\code{\link[=annotate_hit_info]{annotate_hit_info()}}, \code{\link[=plot_hit_stratify_bar]{plot_hit_stratify_bar()}}
}
