View source: R/fastq_helpers.R
mergeFastq | R Documentation |
Will use multithreading to speed up process. Only works for Unix OS (Linux and Mac)
mergeFastq(in_files, out_files, BPPARAM = bpparam())
in_files |
|
out_files |
|
BPPARAM |
how many cores/threads to use? default: bpparam().
To see number of threads used, do |
invisible(NULL).
fastq.folder <- tempdir() # <- Your fastq files
infiles <- dir(fastq.folder, "*.fastq", full.names = TRUE)
## Not run:
# Seperate files into groups (here it is 4 output files from 12 input files)
in_files <- c(paste0(grep(infiles, pattern = paste0("ribopool-",
seq(11, 14), collapse = "|"), value = TRUE), collapse = " "),
paste0(grep(infiles, pattern = paste0("ribopool-",
seq(18, 19), collapse = "|"), value = TRUE), collapse = " "),
paste0(grep(infiles, pattern = paste0("C11-",
seq(11, 14), collapse = "|"), value = TRUE), collapse = " "),
paste0(grep(infiles, pattern = paste0("C11-",
seq(18, 19), collapse = "|"), value = TRUE), collapse = " "))
out_files <- paste0(c("SSU_ribopool", "LSU_ribopool", "SSU_WT", "LSU_WT"), ".fastq.gz")
merged.fastq.folder <- file.path(fastq.folder, "merged/")
out_files <- file.path(merged.fastq.folder, out_files)
mergeFastq(in_files, out_files)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.