## TODO: combine mmultipl plots par(mfrow)
#' inspect read trimming results
#'
#' Convenience wrapper for DADA2 read processing functions. Generates QC plots from a given fastq file before and after quality control by DADA2.
#' @param readfiles (Required) Path to single-end 454 demultiplexed fastq files
#' @param filtfiles (Required) Path to quality-filtered fastq files generated by std_(454/illum_SE/illum_PE)_preprocess
#' @param filenum (Optional) Number of fastq read file to plot (numeric).
#' @keywords read processing dada2
#' @export
#' @examples
#' insp_reads()
# Inspect read quality
insp_reads <- function(readfiles, filtfiles, filenum=1){
# store raw fastq file names
fqs <- sort(
list.files(
readfiles,
pattern = "*.f*q",
full.names = TRUE
)
)
# store filtered fastq file names
ffqs <- sort(
list.files(
filtfiles,
full.names = TRUE
)
)
# create a composite before-after plot
qgraph <- dada2::plotQualityProfile(
fqs[filenum]
#main="Before filtering"
)
qgraph2 <- dada2::plotQualityProfile(
ffqs[filenum]
#main="After filtering"
)
pl <- list("p1" = qgraph, "p2" = qgraph2)
return(pl)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.