learnErrors | R Documentation |
derep-class
objects.Error rates are learned by alternating between sample inference and error rate estimation
until convergence. Sample inferences is performed by the dada
function.
Error rate estimation is performed by errorEstimationFunction
.
The output of this function serves as input to the dada function call as the err
parameter.
learnErrors(
fls,
nbases = 1e+08,
nreads = NULL,
errorEstimationFunction = loessErrfun,
multithread = FALSE,
randomize = FALSE,
MAX_CONSIST = 10,
OMEGA_C = 0,
qualityType = "Auto",
verbose = FALSE,
...
)
fls |
(Required). |
nbases |
(Optional). Default 1e8. The minimum number of total bases to use for error rate learning. Samples are read into memory until at least this number of total bases has been reached, or all provided samples have been read in. |
nreads |
(Optional). Default NULL. DEPRECATED. Please update your code to use the nbases parameter. |
errorEstimationFunction |
(Optional). Function. Default
|
multithread |
(Optional). Default is FALSE.
If TRUE, multithreading is enabled and the number of available threads is automatically determined.
If an integer is provided, the number of threads to use is set by passing the argument on to
|
randomize |
(Optional). Default FALSE. If FALSE, samples are read in the provided order until enough reads are obtained. If TRUE, samples are picked at random from those provided. |
MAX_CONSIST |
(Optional). Default 10. The maximum number of times to step through the self-consistency loop. If convergence was not reached in MAX_CONSIST steps, the estimated error rates in the last step are returned. |
OMEGA_C |
(Optional). Default 0.
The threshold at which unique sequences inferred to contain errors are corrected in the final output,
and used to estimate the error rates (see more at |
qualityType |
(Optional). |
verbose |
(Optional). Default TRUE Print verbose text output. More fine-grained control is available by providing an integer argument.
|
... |
(Optional). Additional arguments will be passed on to the |
A named list with three entries: $err_out: A numeric matrix with the learned error rates. $err_in: The initialization error rates (unimportant). $trans: A feature table of observed transitions for each type (eg. A->C) and quality score.
derepFastq
, plotErrors
, loessErrfun
, dada
fl1 <- system.file("extdata", "sam1F.fastq.gz", package="dada2")
fl2 <- system.file("extdata", "sam2F.fastq.gz", package="dada2")
err <- learnErrors(c(fl1, fl2))
err <- learnErrors(c(fl1, fl2), nbases=5000000, randomize=TRUE)
# Using a list of derep-class objects
dereps <- derepFastq(c(fl1, fl2))
err <- learnErrors(dereps, multithread=TRUE, randomize=TRUE, MAX_CONSIST=20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.