Plot observed and estimated error rates.
This function plots the observed frequency of each transition (eg. A->C) as a function of the associated quality score. It also plots the final estimated error rates (if they exist). The initial input rates and the expected error rates under the nominal definition of quality scores can also be shown.
plotErrors( dq, nti = c("A", "C", "G", "T"), ntj = c("A", "C", "G", "T"), obs = TRUE, err_out = TRUE, err_in = FALSE, nominalQ = FALSE )
dq |
(Required). An object from which error rates can be extracted. Valid inputs are
coercible by |
nti |
(Optional). Default c("A","C","G","T"). Some combination of the 4 DNA nucleotides. |
ntj |
(Optional). Default c("A","C","G","T"). Some combination of the 4 DNA nucleotides. The error rates from nti->ntj will be plotted. If multiple nti or ntj are chosen, error rates from each-to-each will be plotted in a grid. |
obs |
(Optional). Default TRUE. If TRUE, the observed error rates are plotted as points. |
err_out |
(Optional). Default TRUE. If TRUE, plot the output error rates (solid line). |
err_in |
(Optional). Default FALSE. If TRUE, plot the input error rates (dashed line). |
nominalQ |
(Optional). Default FALSE. If TRUE, plot the expected error rates (red line) if quality scores exactly matched their nominal definition: Q = -10 log10(p_err). |
derep1 = derepFastq(system.file("extdata", "sam1F.fastq.gz", package="dada2"), verbose = TRUE) dada1 <- dada(derep1, err = inflateErr(tperr1, 2), errorEstimationFunction = loessErrfun) plotErrors(dada1) plotErrors(dada1, "A", "C") plotErrors(dada1, nti="A", ntj=c("A","C","G","T"), err_in=TRUE, nominalQ=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.