R/fastqc.R

Defines functions fastqc

Documented in fastqc

#' Quality Control with FastQC
#'
#' Runs [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) for
#'  quality control analysis of FastQ files.
#' @param files String or character vector with the path and filename of the
#' FastQ files.
#' @inheritParams process_epigenome
#' @return Creates a folder `path_fastqc` containing the output reports
#' generated by FastQC. See the [FastQC documentation](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/)
#' for details.
#' @export
#' @examples
#' \dontrun{
#' fastqc(files="path/to/fastq/file.fastq.gz",
#'        path_fastqc="fastqc/", cores=6)
#' }
fastqc <- function(files,
                   path_fastqc="fastqc/",
                   cores=6) {
  message(">> Quality Control with FastQC")
  dir.create(path_fastqc, F)

  cmd <- paste("fastqc", "-o", path_fastqc, "-t", cores, paste0(files, collapse=" "))
  print(cmd)
  system(cmd)
}
mireia-bioinfo/pipelineNGS documentation built on Jan. 2, 2023, 11:18 a.m.