noqualErrfun: Estimate error rates for each type of transition while...

Description Usage Arguments Value Examples

View source: R/errorModels.R

Description

This function accepts a matrix of observed transitions, groups together all observed transitions regardless of quality scores, and estimates the error rate for that transition as the observed fraction of those transitions. This can be used in place of the default loessErrfun when calling learnErrors or link{dada} with the effect that quality scores will be effectively ignored.

Usage

1
noqualErrfun(trans, pseudocount = 1)

Arguments

trans

(Required). A matrix of the observed transition counts. Must be 16 rows, with the rows named "A2A", "A2C", ...

pseudocount

(Optional). Default 1. Added to each type of transition.

Value

A numeric matrix with 16 rows and the same number of columns as trans. The estimated error rates for each transition (row, eg. "A2C") are identical across all columns (which correspond to quality scores).

Examples

1
2
fl1 <- system.file("extdata", "sam1F.fastq.gz", package="dada2")
err.noqual <- learnErrors(fl1, errorEstimationFunction=noqualErrfun)

dada2 documentation built on Nov. 8, 2020, 6:48 p.m.