% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module6_auc_matrix.R
\name{extract_cluster_hit}
\alias{extract_cluster_hit}
\title{Extract the most active compound cluster}
\usage{
extract_cluster_hit(mat, cluster_result, direction = c("low", "high"))
}
\arguments{
\item{mat}{The AUC matrix used for clustering.}

\item{cluster_result}{The list returned by \code{\link[=cluster_auc_matrix]{cluster_auc_matrix()}}.}

\item{direction}{\code{"low"} (default) selects the lowest-AUC cluster (most
active); \code{"high"} selects the highest-AUC cluster.}
}
\value{
A character vector of compound ids in the selected cluster.
}
\description{
Returns the compounds belonging to the cluster with the most extreme mean
activity, that is the lowest mean AUC (strongest potency) by default.
}
\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"))
m <- build_auc_matrix(drc$meta)
extract_cluster_hit(m, cluster_auc_matrix(m, k = 2))

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