Learn R Programming

qpcR (version 1.3-7.1)

efficiency: Calculation of qPCR efficiency and other important qPCR parameters

Description

This function calculates the PCR efficiency of a model of class 'pcrfit', including several other important values for qPCR quantification like the first and second derivatives and the corresponding maxima thereof (i.e. threshold cycles). These values can subsequently be used for the calculation of PCR kinetics, fold induction etc. All values are included in a graphical output of the fit. Additionally, several measures of goodness-of-fit are calculated, i.e. the Akaike Information Criterion (AIC), the residual variance and the $R^2$ value.

Usage

efficiency(object, plot = TRUE, type = "cpD2", thresh = NULL, 
           shift = 0, amount = NULL, baseline = FALSE, basefac = 1, ...)

Arguments

object
an object of class 'pcrfit'.
plot
logical. If TRUE, a graph is displayed. If FALSE, values are printed out.
type
the method of efficiency estimation. See 'Details'.
thresh
an (optional) numeric value for a fluorescence threshold border. Overrides type.
shift
a user defined shift in cycles from the values defined by type. See 'Examples'.
amount
the template amount or molecule number for quantitative calibration.
baseline
type of baseline subtraction. See 'Details'.
basefac
a factor when using averaged baseline cycles, such as 0.95.
...
other parameters to be passed to eff or plot.pcrfit.

Value

  • A list with the following components:
  • effthe PCR efficiency.
  • resVarthe residual variance.
  • AICcthe bias-corrected Akaike Information Criterion.
  • AICthe Akaike Information Criterion.
  • Rsqthe $R^2$ value.
  • Rsq.adthe adjusted $R_{adj}^2$ value.
  • cpD1the first derivative maximum (point of inflection in 'l4' or 'b4' models, can be used for defining the threshold cycle).
  • cpD2the second derivative maximum (turning point of cpD1, more often used for defining the threshold cycle).
  • cpEthe PCR cycle with the highest efficiency.
  • cpRthe PCR cycle within the exponential region calculated as under 'Details'.
  • cpTthe PCR cycle corresponding to the fluorescence threshold as defined in thresh.
  • Cy0the PCR threshold cycle 'Cy0' according to Guescini et al. See 'Details'.
  • cpCQthe PCR cycle corresponding to the 20% fluorescence value at 'cpD2'.
  • cpMRthe PCR cycle corresponding to the 'maxRatio', if this was selected.
  • fluothe raw fluorescence value at the point defined by type or thresh.
  • init1the initial template fluorescence from the sigmoidal model, calculated as under 'Details'.
  • init2the initial template fluorescence from an exponential model, calculated as under 'Details'.
  • cfthe conversion factor between raw fluorescence and template amount, if the latter is defined.
  • If object was of type 'modlist', the results are given as a matrix, with samples in columns.

Details

The efficiency is always (with the exception of type = "maxRatio") calculated from the efficiency curve (in blue), which is calculated according to $E_n = \frac{F_n}{F_{n-1}}$ from the fitted curve, but taken from different points at the curve, as to be defined in type: "cpD2" taken from the maximum of the second derivative curve, "cpD1" taken from the maximum of the first derivative curve, "maxE" taken from the maximum of the efficiency curve, "expR" taken from the exponential region by $expR = cpD2-(cpD1-cpD2)$, "CQ" taken from the 20% value of the fluorescence at "cpD2" as developed by Corbett Research (comparative quantification), "Cy0" the intersection of a tangent on the first derivative maximum with the abscissa as calculated according to Guescini et al. or a numeric value taken from the threshold cycle output of the PCR software, i.e. 15.24 as defined in type or a numeric value taken from the fluorescence threshold output of the PCR software as defined in thresh. The initial fluorescence $F_0$ for relative or absolute quantification is either calculated by setting $x = 0$ in the sigmoidal model of object giving init1 or by calculating an exponential model down (init2) with $F_0 = \frac{F_n}{E^n}$, with $F_n$ = raw fluorescence, $E$ = PCR efficiency and $n$ = the cycle number defined by type. If a template amount is defined, a conversion factor $cf = \frac{amount}{F_0}$ is given. The different measures for goodness-of-fit give an overview for the validity of the efficiency estimation. First and second derivatives are calculated from the fitted function and the maxima of the derivatives curve and the efficiency curve are obtained. If type = "maxRatio", the maximum efficiency is calculated from the cubic spline interpolated raw fluorescence values and therefore NOT from the sigmoidal fit. This is a different paradigm and will usually result in fairly the same threshold cycles as with type = "cpD2", but the efficiencies are generally lower. See documentation to maxRatio. This method is usually not applied for calculating efficiencies that are to be used for relative quantification, but one might try... baseline subtraction is done by either subtracting the baseline parameter 'c' of the sigmoidal model and refitting ("TRUE"), using a single value (i.e. 0.5) or the averaged values from a defined range of cycles, i.e. 1:8. It is switched off by default, but in case of data with a high baseline (such as in TaqMan PCR), it should be turned on as otherwise this will give highly underestimated efficiencies and hence wrong init2 values.

References

Validation of a quantitative method for real time PCR kinetics. Liu W & Saint DA. BBRC (2002), 294: 347-353. A new real-time PCR method to overcome significant quantitative inaccuracy due to slight amplification inhibition. Guescini M, Sisti D, Rocchi MB, Stocchi L & Stocchi V. BMC Bioinformatics (2008), 9: 326.

Examples

Run this code
## Fitting initial model
m1 <-  pcrfit(reps, 1, 2, l4)
efficiency(m1)
 
## Using one cycle 'downstream'
## of second derivative max
efficiency(m1, type = "cpD2", shift = -1)

## using "maxE" method, with calculation of PCR efficiency
## 2 cycles 'upstream' from the cycle of max efficiency
efficiency(m1, type = "maxE", shift = 2)

## using the exponential region
efficiency(m1, type = "expR")

## using threshold cycle (i.e. 15.32) 
## from PCR software
efficiency(m1, type = 15.32)

## using Cy0 method from
## Guescini et al. (2008),
## add Cy0 tangent
efficiency(m1, type = "Cy0")
Cy0(m1, add = TRUE)

## using a defined fluorescence
## threshold value from PCR software
efficiency(m1, thresh = 1)
 
## using the first 30 cycles and a template amount
## (optical calibration)
m2 <-  pcrfit(reps[1:30, ], 1, 2, l5)
efficiency(m2, amount = 1E3)

## using 'maxRatio' method from Shain et al. (2008)
## baseshifting essential!
efficiency(m1, type = "maxRatio", baseshift = 0.2)

## using the efficiency from a cubic spline fit
## of the 'eff' function
efficiency(m1, method = "spline")

## on a modlist with plotting
## of the efficiencies
ml1 <- modlist(reps, model = l5)
res <- sapply(ml1, function(x) efficiency(x)$eff)
barplot(as.numeric(res))

Run the code above in your browser using DataLab