R/check_enrichment_mode.R

Defines functions check_enrichment_mode

Documented in check_enrichment_mode

#' Check enrichment mode
#' 
#' For functions where \code{EnrichmentMode} is an argument, 
#' check whether a valid option has been selected. 
#' 
#' @keywords internal
check_enrichment_mode <- function(EnrichmentMode) {
    if (!EnrichmentMode %in% c("Linear", "Top 10%")) {
        stop_msg <- paste0(
            "EnrichmentMode argument must be one of:",
            "'Linear' or 'Top 10%'."
        )
        stop(stop_msg)
    }
}
NathanSkene/MAGMA_Celltyping documentation built on Aug. 21, 2023, 8:55 a.m.