Description Usage Arguments Details Value Author(s) References Examples
Fastq files sometimes need to be preprocessed before alignment. Three different mechanisms come into use here: Discarding whole reads, trimming sequences and masking nucleotides. This function performs all three mechanisms together in one step. All reads with insufficient phred are discarded. The reads can be trimmed ad each terminal side (on trim of fixed size and a trim based on quality thresholds).
1 2 3 4 | trimFastq(infile, outfile="keep.fq.gz", discard="disc.fq.gz",
qualDiscard=0, qualMask=0, fixTrimLeft=0,
fixTrimRight=0, qualTrimLeft=0, qualTrimRight=0,
qualMaskValue=78, minSeqLen=0)
|
infile |
|
outfile |
|
discard |
|
qualDiscard |
|
qualMask |
|
fixTrimLeft |
|
fixTrimRight |
|
qualMaskValue |
|
qualTrimLeft |
|
qualTrimRight |
|
minSeqLen |
|
The function divides the input file into two outputs: The output file (contains the accepted reads) and the discard file (contains the excluded reads). After trim operations, the function checks for remaining read length. When the read length is smaller than minSeqLen, the read will be discarded.
Numeric. A vector of length 2 which contains the number of reads which are written to output and to discard
Wolfgang Kaisers
Ewing B, Green P Base-calling of automated sequencer traces using phred. II. Error probabilities. Genome Research 1998 Vol. 8 No. 3 186-194
1 2 3 4 | basedir <- system.file("extdata", package="seqTools")
setwd(basedir)
trimFastq("sim.fq.gz", qualDiscard=10, qualMask=15, fixTrimLeft=2,
fixTrimRight=2, qualTrimLeft=28, qualTrimRight=30, minSeqLen=5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.