expfit: Calculation of PCR efficiency by fitting an exponential model

Description Usage Arguments Details Value Author(s) References Examples

Description

An exponential model is fit to a window of defined size on the qPCR raw data. The window is identified either by the second derivative maximum 'cpD2' (default), 'studentized outlier' method as described in Tichopad et al. (2003), the 'midpoint' method (Peirson et al., 2003) or by subtracting the difference of cpD1 and cpD2 from cpD2 ('ERBCP', unpublished).

Usage

1
2
3
4
expfit(object, method = c("cpD2", "outlier", "midpoint", "ERBCP"),
       model = c("exp", "linexp"), offset = 0, pval = 0.05, n.outl = 3, 
       n.ground = 1:5, corfact = 1, fix = c("top", "bottom", "middle"), 
       nfit = 5, plot = TRUE, ...) 

Arguments

object

an object of class 'pcrfit'.

method

one of the four possible methods to be used for defining the position of the fitting window.

model

which exponential model to use. expGrowth is default, but the linear-exponential model linexp can also be chosen.

offset

for method = "cpD2", the cycle offset from second derivative maximum.

pval

for method = "outlier", the p-value for the outlier test.

n.outl

for method = "outlier", the number of successive outlier cycles.

n.ground

for method = "midpoint", the number of cycles in the noisy ground phase to calculate the standard deviation from.

corfact

for method = "ERBCP", the correction factor for finding the exponential region. See 'Details'.

fix

for methods "midpoint" and "ERBCP", the orientation of the fitting window based on the identified point. See 'Details'.

nfit

the size of the fitting window.

plot

logical. If TRUE, a graphical display of the curve and the fitted region is shown.

...

other parameters to be passed to the plotting function.

Details

The exponential growth function f(x) = a \cdot exp(b \cdot x) + c is fit to a subset of the data. Calls efficiency for calculation of the second derivative maximum, takeoff for calculation of the studentized residuals and 'outlier' cycle, and midpoint for calculation of the exponential phase 'midpoint'. For method 'ERBCP' (Exponential Region By Crossing Points), the exponential region is calculated by expR = cpD2 - \code{corfact} \cdot (cpD1-cpD2). The efficiency is calculated from the exponential fit with E = exp(b) and the inital template fluorescence F_0 = a.

Value

A list with the following components:

point

the point within the exponential region as identified by one of the three methods.

cycles

the cycles of the identified region.

eff

the efficiency calculated from the exponential fit.

AIC

the Akaike Information Criterion of the fit.

resVar

the residual variance of the fit.

RMSE

the root-mean-squared-error of the fit.

init

the initial template fluorescence.

mod

the exponential model of class 'nls'.

Author(s)

Andrej-Nikolai Spiess

References

Standardized determination of real-time PCR efficiency from a single reaction set-up.
Tichopad A, Dilger M, Schwarz G & Pfaffl MW.
Nucleic Acids Research (2003), 31:e122.

Comprehensive algorithm for quantitative real-time polymerase chain reaction.
Zhao S & Fernald RD.
J Comput Biol (2005), 12:1047-64.

Examples

1
2
3
4
5
6
7
8
9
## Using default SDM method.
m1 <- pcrfit(reps, 1, 2, l5)
expfit(m1)

## Using 'outlier' method.
expfit(m1, method = "outlier")

## Linear exponential model.
expfit(m1, model = "linexp")

Example output

Loading required package: MASS
Loading required package: minpack.lm
Loading required package: rgl
Loading required package: robustbase
Loading required package: Matrix
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
$point
[1] 15

$cycles
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15

$eff
[1] 1.746425

$AIC
[1] -59.35145

$resVar
[1] 0.0008211293

$RMSE
[1] 0.02563013

$init
[1] 0.0006388812

$mod
Nonlinear regression model
  model: Fluo ~ a * exp(b * Cycles) + c
   data: DATA
        a         b         c 
0.0003658 0.5575706 0.0010023 
 residual sum-of-squares: 0.009854

Number of iterations to convergence: 21 
Achieved convergence tolerance: 1.49e-08

$point
[1] 10

$cycles
[1] 10 11 12 13 14

$eff
[1] 1.83294

$AIC
[1] -40.85621

$resVar
[1] 8.353508e-06

$RMSE
[1] 0.001827951

$init
[1] 0.0003183563

$mod
Nonlinear regression model
  model: Fluo ~ a * exp(b * Cycles) + c
   data: DATA
        a         b         c 
0.0001737 0.6059214 0.0419477 
 residual sum-of-squares: 1.671e-05

Number of iterations to convergence: 56 
Achieved convergence tolerance: 1.49e-08

$point
[1] 15

$cycles
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15

$eff
[1] 1.937917

$AIC
[1] -92.65232

$resVar
[1] 8.514032e-05

$RMSE
[1] 0.00790166

$init
[1] 0.0001374199

$mod
Nonlinear regression model
  model: Fluo ~ a * exp(b * Cycles) + (k * Cycles) + c
   data: DATA
         a          b          c          k 
 7.091e-05  6.616e-01 -5.831e-02  1.306e-02 
 residual sum-of-squares: 0.0009365

Number of iterations to convergence: 16 
Achieved convergence tolerance: 1.49e-08

qpcR documentation built on May 2, 2019, 5:17 a.m.

Related to expfit in qpcR...