R/get_ic50_threshold.R

Defines functions get_ic50_threshold

Documented in get_ic50_threshold

#' Look up the IC50 value of a certain quantile
#'
#' Look up the IC50 value of a certain quantile.
#' Such a value can serve as a threshold:
#' for example, to get the IC50 value from below which the
#' peptides bind strongest.
#' @inheritParams default_params_doc
#' @param percentile the IC50 percentile. The IC50 that separates the top
#' \code{percentile} from the worse binders
#' @export
get_ic50_threshold <- function(
  peptide_length = 9,
  mhc_haplotype,
  percentile = 0.02
) {
  lut <- mhcnpreds::get_lut(
    peptide_length = peptide_length,
    mhc_haplotype = mhc_haplotype
  )
  mhcnpreds::convert_quantile_to_ic50(lut = lut, q = percentile)
}
richelbilderbeek/mhcnpreds documentation built on Nov. 25, 2020, 3:59 a.m.