filter_trim | R Documentation |
dada2::filterAndTrim()
to use in
targets pipelineThis function filter and trim (with parameters passed on to
dada2::filterAndTrim()
function) forward sequences or paired end
sequence if 'rev' parameter is set. It return the list of files to
subsequent analysis in a targets pipeline.
filter_trim(
fw = NULL,
rev = NULL,
output_fw = file.path(paste(getwd(), "/output/filterAndTrim_fwd", sep = "")),
output_rev = file.path(paste(getwd(), "/output/filterAndTrim_rev", sep = "")),
return_a_vector = FALSE,
...
)
fw |
(required) a list of forward fastq files |
rev |
a list of reverse fastq files for paired end trimming |
output_fw |
Path to output folder for forward files. By default, this function will create a folder "output/filterAndTrim_fwd" in the current working directory. |
output_rev |
Path to output folder for reverse files. By default, this function will create a folder "output/filterAndTrim_fwd" in the current working directory. |
return_a_vector |
(logical, default FALSE) If true, the return is a vector of path (usefull when used with targets::tar_targets(..., format="file")) |
... |
Other parameters passed on to |
A list of files. If rev is set, will return a list of two lists. The first list is a list of forward files, and the second one is a list of reverse files.
Adrien Taudière
dada2::filterAndTrim()
testFastqs_fw <- c(
system.file("extdata", "sam1F.fastq.gz", package = "dada2"),
system.file("extdata", "sam2F.fastq.gz", package = "dada2")
)
testFastqs_rev <- c(
system.file("extdata", "sam1R.fastq.gz", package = "dada2"),
system.file("extdata", "sam2R.fastq.gz", package = "dada2")
)
filt_fastq_fw <- filter_trim(testFastqs_fw, output_fw = tempdir())
derep_fw <- derepFastq(filt_fastq_fw[1])
derep_fw
filt_fastq_pe <- filter_trim(testFastqs_fw,
testFastqs_rev,
output_fw = tempdir("fw"),
output_rev = tempdir("rev")
)
derep_fw_pe <- derepFastq(filt_fastq_pe[[1]])
derep_rv_pe <- derepFastq(filt_fastq_pe[[2]])
derep_fw_pe
derep_rv_pe
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.