Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

inflateErr

Inflates an error rate matrix by a specified factor, while accounting for saturation.


Description

Error rates are "inflated" by the specified factor, while appropriately saturating so that rates cannot exceed 1. The formula is: new_err_rate <- err_rate * inflate / (1 + (inflate-1) * err_rate)

Usage

inflateErr(err, inflation, inflateSelfTransitions = FALSE)

Arguments

err

(Required). A numeric matrix of transition rates (16 rows, named "A2A", "A2C", ...).

inflation

(Required). The fold-factor by which to inflate the transition rates.

inflateSelfTransitions

(Optional). Default FALSE. If True, self-transitions (eg. A->A) are also inflated.

Value

An error rate matrix of the same dimensions as the input error rate matrix.

Examples

tperr2 <- inflateErr(tperr1, 2)
 tperr3.all <- inflateErr(tperr1, 3, inflateSelfTransitions=TRUE)

dada2

Accurate, high-resolution sample inference from amplicon sequencing data

v1.18.0
LGPL-3
Authors
Benjamin Callahan <benjamin.j.callahan@gmail.com>, Paul McMurdie, Susan Holmes
Initial release
2020-08-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.