## Load a FASTQ file
s.fastq <- readSeqFile(system.file('extdata', 'test.fastq', package='qrqc'))
## Plot qualities
qualPlot(s.fastq)
## Combine with ggplot2 to produce custom graphics
p <- qualPlot(s.fastq, smooth=FALSE)
p <- p + geom_smooth(aes(x=position, y=quality),
data=getMCQual(s.fastq), method="lm", color="green", se=FALSE)
p <- p + theme_bw()
p
## Plot multiple quality plots
s.trimmed.fastq <- readSeqFile(system.file('extdata',
'test-trimmed.fastq', package='qrqc'))
qualPlot(list("not trimmed"=s.fastq, "trimmed"=s.trimmed.fastq))
Run the code above in your browser using DataLab