## Trims adaptors hierarchically from longest to shortest match from right end of read. ## If 'internalmatch=TRUE' then internal matches will trigger the same behavior. The ## argument minpatternlength defines shortest adaptor match to consider for reads ## containing only partial adaptors at the right end.

trimbatch(fq, pattern, internalmatch=FALSE, minpatternlength=8, 
                            Nnumber=1, polyhomo=100, minreadlength=18, 
                            maxreadlength)

Arguments

fq

character path to fastq file that contains the target sequences.

pattern

character pattern used to trim the sequence.

internalmatch

The default is FALSE. Trims adaptors hierarchically from longest to shortest match from right end of read. If 'internalmatch=TRUE' then internal matches will trigger the same behavior.

minpatternlength

It defines shortest adaptor match to consider for reads containing only partial adaptors at the right end.

Nnumber

A numeric value representing a minimum criterion for the filter. It selects elements with fewer than Nnumber 'N' symbols in each element.

polyhomo

A numeric value representing a maximum criterion for the filter. It selects elements with fewer than threshold copies of any nucleotide.

minreadlength

numeric value representing minimum read length.

maxreadlength

numeric value representing maximun read length.

Author

Thomas Girke

Examples

## 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
#> Instance of 'SYSargs2':
#>    Slot names/accessors: 
#>       targets: 18 (M1A...V12B), targetsheader: 4 (lines)
#>       modules: 0
#>       wf: 0, clt: 1, yamlinput: 6 (inputs)
#>       input: 18, output: 18
#>       cmdlist: 18
#>    Sub Steps:
#>       1. trim-pe (rendered: TRUE)
#> 
#> 
if (FALSE) {
iterTrim <- "trimbatch(fq, pattern='ACACGTCT', internalmatch=FALSE, minpatternlength=6, Nnumber=1, polyhomo=50, minreadlength=16, maxreadlength=101)" 
preprocessReads(args=trim[1], Fct=iterTrim, batchsize=100000, overwrite=TRUE, compress=TRUE)
}