Learn R Programming

systemPipeR (version 1.0.12)

preprocessReads: Run custom read preprocessing functions

Description

Function to run custom read preprocessing functions on FASTQ files specified in the infile1 slot of SYSargs objects. The names of the corresponding output FASTQ files are specified in the outpaths slot of the same SYSargs object. The function uses the FastqStreamer function from the ShortRead package to stream through large files in a memory-efficient manner.

Usage

preprocessReads(args, Fct, batchsize = 1e+05, overwrite = TRUE, ...)

Arguments

args
Object of class SYSargs
Fct
character string of custom read preprocessing function call where both the input and output needs to be an object of class ShortReadQ. The name of the input ShortReadQ object needs to be fq.
batchsize
Number of reads to process in each iteration by the internally used FastqStreamer function.
overwrite
If TRUE existing file will be overwritten.
...
To pass on additional arguments to the internally used writeFastq function.

Value

Writes to files in FASTQ format. Their names are specified by outpaths(args).

See Also

FastqStreamer

Examples

Run this code
param <- system.file("extdata", "trim.param", package="systemPipeR")
targets <- system.file("extdata", "targets.txt", package="systemPipeR")
args <- systemArgs(sysma=param, mytargets=targets)
## Not run: 
# preprocessReads(args=args, Fct="trimLRPatterns(Rpattern='GCCCGGGTAA', subject=fq)", batchsize=100000, overwrite=TRUE, compress=TRUE)
# ## End(Not run)

Run the code above in your browser using DataLab