FiltbyQ30: Filter haplotypes by Q30

View source: R/FiltbyQ30.R

FiltbyQ30R Documentation

Filter haplotypes by Q30


This function applies FastqStreamer over a fastq file and removes all reads that have a defined fraction of bases below Q30. The remaining reads will be saved in a new fastq file.


FiltbyQ30(max.pct = 0.05, flashfiles, flashres, ncores = 1)



The maximum percentage of bases below Q30 allowed in reads (by default,5%).


Vector including the paths of files that are going to be processed, with fastq extension.


Table of results obtained after the execution of R1R2toFLASH function.


Number of cores to use for parallelization with mclapply.hack.


This function is designed to be applied after R1R2toFLASH function from the same package. If flashres is not specified but FLASH extension was previously done, the function will try to load the FLASH results table from the reports folder.


A data.frame object containing FLASH and Filtering results. This results table includes two new columns with respect to FLASH results table, named FiltQ30 (number of filtered reads) and Raw (total sequencing reads).

After the execution, a fastq file with remaining reads for each pool will be saved in a new flashFilt folder (if it is not previously created). Additionaly, two report files will be generated in a reports folder:

  1. FiltQ30.barplot.pdf: Includes a first Bar plot representing raw reads, extended reads by FLASH and filtered reads, and a second Bar plot with the yield by process for each pool.

  2. FiltQ30_report.txt: Includes the same data frame returned by the function containing FLASH and Filtering results.


Alicia Aranda

See Also

R1R2toFLASH, FastqStreamer


runDir <- "./run"
runfiles <- list.files(runDir,recursive=TRUE,full.names=TRUE,include.dirs=TRUE)
flash <- "./FLASH/flash.exe"
flashDir <- "./flash"
flashfiles <- list.files(flashDir,recursive=TRUE,full.names=TRUE,include.dirs=TRUE)
flashres <- R1R2toFLASH(runfiles,flash)
filtres <- FiltbyQ30(max.pct=0.05,flashfiles,flashres)

aliafdz/QApckg documentation built on June 2, 2022, 10:29 a.m.