R/generate_template.R

Defines functions generate.template

Documented in generate.template

#' Generate Pipeline Template
#'
#' Generate an R script template for running the Sharpton Lab dada2 pipeline
#' @param filename A string to name the resulting template. If the .R extension is not included in the filename, it will be appended. Default is "dada2_processing.R"
#' @export
#' @examples
#' generate.template()
#' file.show("dada2_processing.R")

generate.template <- function(filename = "dada2_processing.R") {
  if (!grepl("\\.R$", filename)) { filename <- paste0(filename, ".R")}
  writeLines(template.code, con = filename)
}
kstagaman/sharpton-lab-dada2-pipeline documentation built on Sept. 24, 2022, 11:41 a.m.