R/list_yamls.R

Defines functions list_yamls

Documented in list_yamls

#' List included yaml files 
#' 
#' List the yaml files included within \code{echconda}. 
#' These are provided to make different conda environments that are useful for
#' specific workflows.
#' 
#' @param verbose Print messages.
#' @export
#' @examples 
#' yamls <- echoconda::list_yamls()
list_yamls <- function(verbose = TRUE){
    
    cdir <- system.file(package = "echoconda","conda")
    yamls <- list.files(cdir, pattern = ".yml$|.yaml$",
                        ignore.case = TRUE,
                        full.names = TRUE, recursive = TRUE)
    meta <- data.table::data.table(
        conda_env=sapply(yamls, name_from_yaml, verbose=FALSE),
        yaml_path=yamls
    ) 
    messager(paste0(
        nrow(meta)," conda yamls available:\n",
        paste0(" - ",meta$conda_env, collapse = "\n")
    ),
    v=verbose)
    return(meta)
}
RajLabMSSM/echoconda documentation built on June 6, 2024, 10:38 a.m.