R/check_bioc_version.R

Defines functions check_bioc_version

check_bioc_version <- function(bioc){
  
  opts <- bioc_r_versions(return_opts = TRUE)
  bioc <- tolower(as.character(bioc))
  if(bioc %in% c("release_*",
                 "release*",
                 "release")){
    bioc <- "release"
  } else {
    bioc <- gsub("_",".",gsub("RELEASE_","",bioc, ignore.case = TRUE))
  } 
  if(!bioc %in% opts){
    stopper(paste0("bioc=",shQuote(bioc)),
            "bioc version must be one of:",
            paste("\n -",shQuote(c('devel','release',opts)),
                  collapse = ""))
  } else {
    return(bioc)
  }
}

Try the rworkflows package in your browser

Any scripts or data that you put into this service are public.

rworkflows documentation built on May 29, 2024, 2:37 a.m.