neurogenomics / EpiCompare

Comparison, benchmarking & QC of epigenetic datasets
https://doi.org/doi:10.18129/B9.bioc.EpiCompare
13 stars 3 forks source link

Add more informative Suggest dep messages #133

Closed bschilder closed 1 year ago

bschilder commented 1 year ago

For example, check_genome_build just runs requireNamespace. This may not be enough information for all users to indicate that they need to install this package.

bschilder commented 1 year ago

New internal function now facilitates this throughout EpiCompare:

check_dep <- function(dep){
  if(!requireNamespace(dep, quietly = TRUE)){
    stp <- paste("Package",shQuote(dep),
                 "must be installed to use this function.")
    stop(stp,
         call. = FALSE)
  }
}