Learn R Programming

qpcR (version 1.0-6)

expfit: Calculation of PCR efficiency by fitting of an exponential model and minimization of residual variance

Description

An exponential model is fit to a sliding window of defined size along the qPCR data. In the window with minimal residual variance (or minimal AIC), the efficiency is calculated.

Usage

expfit(object, fitcyc = 5, plot = TRUE, crit = "resVar", start = 5, maxeff = 2, mineff = 1.5)

Arguments

object
a 'drc' object.
fitcyc
the size of the sliding window, default is 5.
plot
if TRUE the result is plotted, if FALSE the result is diplayed on the console.
crit
the criterium to be minimized. Either "resVar" or "AICc".
start
the cycle number to start from. Defaults to 5.
maxeff
the maximum allowed efficiency of the fit.
mineff
the minimum allowed efficiency of the fit. See Details.

Value

  • A list with the following components:
  • cyc.bestthe 'best' cycle with the minimized criterium.
  • Eff.fitthe PCR efficiency calculated from the exponential fit.
  • Eff.curvethe PCR efficiency for each cycle within the exponential phase. See Details.
  • resVarthe residual variance at the best cycle.
  • AICthe AIC at the best cycle.
  • RMSEthe root-mean-squared error at the best cycle.
  • initthe initial template fluorescence, i.e. 'F0'.
  • modthe exponential model from the best fit.

Details

The exponential growth function $f(x) = b * exp(k * x) + e$ is fit to the data. To avoid good fits in the plateau phase, the fitting procedure is stopped at cpD1 (first derivative maximum cycle). The efficiency is calculated a) from the exponential fit with $E = exp(d)$ (Eff.fit) and b) for each cycle within the exponential region from the raw fluorescence values by $E = \frac{F(n)}{F(n-1)}$ (Eff.curve). The inital template fluorescence (F0) is derived from parameter b. Avoiding good fits in the noisy ground phase can be tweaked by increasing the effmin parameter.

Examples

Run this code
m <- multdrc(F1.1 ~ Cycles, data = reps, fct = l5())
expfit(m)
### using AIC as criterion
expfit(m, crit = "AIC")

Run the code above in your browser using DataLab