preprocessReads | R Documentation |
Applies custom read preprocessing functions to single-end or paired-end FASTQ
files. The function uses the FastqStreamer
function from the ShortRead
package to stream through large files in a memory-efficient manner.
preprocessReads(args = NULL,
FileName1 = NULL, FileName2 = NULL,
outfile1 = NULL, outfile2 = NULL,
Fct, batchsize = 100000, overwrite = TRUE, ...)
args |
Object of class |
FileName1 |
Path to input forward fastq file. Defaul is |
FileName2 |
Path to input reverse fastq file. Defaul is |
outfile1 |
Path to output forward fastq file. Defaul is |
outfile2 |
Path to output reverse fastq file. Defaul is |
Fct |
|
batchsize |
Number of reads to process in each iteration by the internally used |
overwrite |
If |
... |
To pass on additional arguments to the internally used |
Writes to files in FASTQ format. Their names are specified by outpaths(args)
.
Thomas Girke
FastqStreamer
## Preprocessing of single-end reads
dir_path <- system.file("extdata/cwl/preprocessReads/trim-se", package="systemPipeR")
targetspath <- system.file("extdata", "targets.txt", package="systemPipeR")
trim <- loadWorkflow(targets=targetspath, wf_file="trim-se.cwl", input_file="trim-se.yml", dir_path=dir_path)
trim <- renderWF(trim, inputvars=c(FileName="_FASTQ_PATH1_", SampleName="_SampleName_"))
## Not run:
preprocessReads(args=trim[1], Fct="trimLRPatterns(Rpattern='GCCCGGGTAA', subject=fq)", batchsize=100000, overwrite=TRUE, compress=TRUE)
## End(Not run)
## Preprocessing of paired-end reads
dir_path <- system.file("extdata/cwl/preprocessReads/trim-pe", package="systemPipeR")
targetspath <- system.file("extdata", "targetsPE.txt", package="systemPipeR")
trim <- loadWorkflow(targets=targetspath, wf_file="trim-pe.cwl", input_file="trim-pe.yml", dir_path=dir_path)
trim <- renderWF(trim, inputvars=c(FileName1="_FASTQ_PATH1_", FileName2="_FASTQ_PATH2_", SampleName="_SampleName_"))
trim
## Not run:
preprocessReads(args=trim[1], Fct="trimLRPatterns(Rpattern='GCCCGGGTAA', subject=fq)", batchsize=100000, overwrite=TRUE, compress=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.