## Not run:
# setwd("/PATH/TO/BAMFILES/")
# samples <- list.files(pattern = ".bam$", full.names = TRUE)
# ## Use the first .bam file as a control for every sample
# # controls <- samples[rep(1, length(samples))]
# ## Use every sample as its own control (i.e., peaks are called on sample itself)
# controls <- samples
# sample.control <- data.frame(samples, controls)
#
# CopywriteR(sample.control = sample.control, destination.folder =
# "/PATH/TO/DESTINATIONFOLDER/", reference.folder =
# "/PATH/TO/REFERENCEFOLDER", ncpu = nrow(sample.control),
# capture.regions.file <- "/PATH/TO/CAPTUREREGIONSFILE")
# ## End(Not run)
Run the code above in your browser using DataLab