efficiency: Calculation of qPCR efficiency and other important qPCR...

Description Usage Arguments Details Value Note Author(s) References Examples

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

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

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.

...

other parameters to be passed to eff or plot.pcrfit.

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...

Value

A list with the following components:

eff

the PCR efficiency.

resVar

the residual variance.

AICc

the bias-corrected Akaike Information Criterion.

AIC

the Akaike Information Criterion.

Rsq

the R^2 value.

Rsq.ad

the adjusted R_{adj}^2 value.

cpD1

the first derivative maximum (point of inflection in 'l4' or 'b4' models, can be used for defining the threshold cycle).

cpD2

the second derivative maximum (turning point of cpD1, more often used for defining the threshold cycle).

cpE

the PCR cycle with the highest efficiency.

cpR

the PCR cycle within the exponential region calculated as under 'Details'.

cpT

the PCR cycle corresponding to the fluorescence threshold as defined in thresh.

Cy0

the PCR threshold cycle 'Cy0' according to Guescini et al. See 'Details'.

cpCQ

the PCR cycle corresponding to the 20% fluorescence value at 'cpD2'.

cpMR

the PCR cycle corresponding to the 'maxRatio', if this was selected.

fluo

the raw fluorescence value at the point defined by type or thresh.

init1

the initial template fluorescence from the sigmoidal model, calculated as under 'Details'.

init2

the initial template fluorescence from an exponential model, calculated as under 'Details'.

cf

the 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.

Note

In some curves that are fitted with the 'b5'/'l5' models, the 'f' (asymmetry) parameter can be extremely high due to severe asymmetric structure. The efficiency curve deduced from the coefficients of the fit can then be very extreme in the exponential region. It is strongly advised to use efficiency(object, method = "spline") so that eff calculates the curve from a cubic spline of the original data points (see 'Examples').

Three parameter models ('b3' or 'l3') do not work very well in calculating the PCR efficiency. It is advisable not to take too many cycles of the plateau phase prior to fitting the model as this has a strong effect on the validity of the efficiency estimates.

Author(s)

Andrej-Nikolai Spiess

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
## 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")

## Not run: 
## 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))

## End(Not run)

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 
$eff
[1] 1.962834

$resVar
[1] 0.00765568

$AICc
[1] -92.95076

$AIC
[1] -93.85985

$Rsq
[1] 0.9997204

$Rsq.ad
[1] 0.9997017

$cpD1
[1] 17.36

$cpD2
[1] 15.44

$cpE
[1] NA

$cpR
[1] NA

$cpT
[1] NA

$Cy0
[1] NA

$cpCQ
[1] NA

$cpMR
[1] NA

$fluo
[1] 1.990569

$init1
[1] 0.06789309

$init2
[1] 5.9821e-05

$cf
[1] NA

$eff
[1] 2.08634

$resVar
[1] 0.00765568

$AICc
[1] -92.95076

$AIC
[1] -93.85985

$Rsq
[1] 0.9997204

$Rsq.ad
[1] 0.9997017

$cpD1
[1] 17.36

$cpD2
[1] 15.44

$cpE
[1] NA

$cpR
[1] NA

$cpT
[1] NA

$Cy0
[1] NA

$cpCQ
[1] NA

$cpMR
[1] NA

$fluo
[1] 1.01413

$init1
[1] 0.06789309

$init2
[1] 2.478411e-05

$cf
[1] NA

$eff
[1] 1.842858

$resVar
[1] 0.00765568

$AICc
[1] -92.95076

$AIC
[1] -93.85985

$Rsq
[1] 0.9997204

$Rsq.ad
[1] 0.9997017

$cpD1
[1] 17.36

$cpD2
[1] 15.44

$cpE
[1] 14.07

$cpR
[1] NA

$cpT
[1] NA

$Cy0
[1] NA

$cpCQ
[1] NA

$cpMR
[1] NA

$fluo
[1] 2.885333

$init1
[1] 0.06789309

$init2
[1] 0.0001562213

$cf
[1] NA

$eff
[1] 2.06845

$resVar
[1] 0.00765568

$AICc
[1] -92.95076

$AIC
[1] -93.85985

$Rsq
[1] 0.9997204

$Rsq.ad
[1] 0.9997017

$cpD1
[1] 17.36

$cpD2
[1] 15.44

$cpE
[1] NA

$cpR
[1] 13.52

$cpT
[1] NA

$Cy0
[1] NA

$cpCQ
[1] NA

$cpMR
[1] NA

$fluo
[1] 0.5159096

$init1
[1] 0.06789309

$init2
[1] 2.786464e-05

$cf
[1] NA

$eff
[1] 1.983049

$resVar
[1] 0.00765568

$AICc
[1] -92.95076

$AIC
[1] -93.85985

$Rsq
[1] 0.9997204

$Rsq.ad
[1] 0.9997017

$cpD1
[1] 17.36

$cpD2
[1] 15.44

$cpE
[1] NA

$cpR
[1] NA

$cpT
[1] NA

$Cy0
[1] NA

$cpCQ
[1] NA

$cpMR
[1] NA

$fluo
[1] 1.844999

$init1
[1] 0.06789309

$init2
[1] 5.138614e-05

$cf
[1] NA

$eff
[1] 2.069285

$resVar
[1] 0.00765568

$AICc
[1] -92.95076

$AIC
[1] -93.85985

$Rsq
[1] 0.9997204

$Rsq.ad
[1] 0.9997017

$cpD1
[1] 17.36

$cpD2
[1] 15.44

$cpE
[1] NA

$cpR
[1] NA

$cpT
[1] NA

$Cy0
[1] 14.67

$cpCQ
[1] NA

$cpMR
[1] NA

$fluo
[1] 1.19316

$init1
[1] 0.06789309

$init2
[1] 2.777255e-05

$cf
[1] NA

[1] 14.67
$eff
[1] 2.088123

$resVar
[1] 0.00765568

$AICc
[1] -92.95076

$AIC
[1] -93.85985

$Rsq
[1] 0.9997204

$Rsq.ad
[1] 0.9997017

$cpD1
[1] 17.36

$cpD2
[1] 15.44

$cpE
[1] NA

$cpR
[1] NA

$cpT
[1] 14.42

$Cy0
[1] NA

$cpCQ
[1] NA

$cpMR
[1] NA

$fluo
[1] 1

$init1
[1] 0.06789309

$init2
[1] 2.449723e-05

$cf
[1] NA

$eff
[1] 1.791674

$resVar
[1] 0.00490772

$AICc
[1] -65.34171

$AIC
[1] -67.84171

$Rsq
[1] 0.9998353

$Rsq.ad
[1] 0.9998089

$cpD1
[1] 17.6

$cpD2
[1] 15.69

$cpE
[1] NA

$cpR
[1] NA

$cpT
[1] NA

$Cy0
[1] NA

$cpCQ
[1] NA

$cpMR
[1] NA

$fluo
[1] 2.36838

$init1
[1] 0.03669235

$init2
[1] 0.0002516612

$cf
[1] 27253.64

$eff
[1] 1.663343

$resVar
[1] 0.00765568

$AICc
[1] -92.95076

$AIC
[1] -93.85985

$Rsq
[1] 0.9997204

$Rsq.ad
[1] 0.9997017

$cpD1
[1] 17.36

$cpD2
[1] 15.44

$cpE
[1] NA

$cpR
[1] NA

$cpT
[1] NA

$Cy0
[1] NA

$cpCQ
[1] NA

$cpMR
[1] 15.47

$fluo
[1] 2.028224

$init1
[1] 0.06789309

$init2
[1] 0.000773619

$cf
[1] NA

$eff
[1] 1.78068

$resVar
[1] 0.00765568

$AICc
[1] -92.95076

$AIC
[1] -93.85985

$Rsq
[1] 0.9997204

$Rsq.ad
[1] 0.9997017

$cpD1
[1] 17.36

$cpD2
[1] 15.44

$cpE
[1] NA

$cpR
[1] NA

$cpT
[1] NA

$Cy0
[1] NA

$cpCQ
[1] NA

$cpMR
[1] NA

$fluo
[1] 1.990569

$init1
[1] 0.06789309

$init2
[1] 0.0002691109

$cf
[1] NA

Making model for F1.1 (l5)
 => Fitting passed...

Making model for F1.2 (l5)
 => Fitting passed...

Making model for F1.3 (l5)
 => Fitting passed...

Making model for F1.4 (l5)
 => Fitting passed...

Making model for F2.1 (l5)
 => Fitting passed...

Making model for F2.2 (l5)
 => Fitting passed...

Making model for F2.3 (l5)
 => Fitting passed...

Making model for F2.4 (l5)
 => Fitting passed...

Making model for F3.1 (l5)
 => Fitting passed...

Making model for F3.2 (l5)
 => Fitting passed...

Making model for F3.3 (l5)
 => Fitting passed...

Making model for F3.4 (l5)
 => Fitting passed...

Making model for F4.1 (l5)
 => Fitting passed...

Making model for F4.2 (l5)
 => Fitting passed...

Making model for F4.3 (l5)
 => Fitting passed...

Making model for F4.4 (l5)
 => Fitting passed...

Making model for F5.1 (l5)
 => Fitting passed...

Making model for F5.2 (l5)
 => Fitting passed...

Making model for F5.3 (l5)
 => Fitting passed...

Making model for F5.4 (l5)
 => Fitting passed...

Making model for F6.1 (l5)
 => Fitting passed...

Making model for F6.2 (l5)
 => Fitting passed...

Making model for F6.3 (l5)
 => Fitting passed...

Making model for F6.4 (l5)
 => Fitting passed...

Making model for F7.1 (l5)
 => Fitting passed...

Making model for F7.2 (l5)
 => Fitting passed...

Making model for F7.3 (l5)
 => Fitting passed...

Making model for F7.4 (l5)
 => Fitting passed...

Calculating delta of first/second derivative maxima...
.........10.........20........

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

Related to efficiency in qpcR...