Learn R Programming

qpcR (version 1.4-1)

calib: Calculation of qPCR efficiency using dilution curves and replicate bootstrapping

Description

This function calculates the PCR efficiency from a classical qPCR dilution experiment. The threshold cycles are plotted against the logarithmized concentration (or dilution) values, a linear regression line is fit and the efficiency calculated by \(E = 10^{\frac{-1}{slope}}\). A graph is displayed with the raw values plotted with the threshold cycle and the linear regression curve. The threshold cycles are calculated either by some arbitrary fluorescence value (i.e. as given by the qPCR software) or calculated from the second derivative maximum of the dilution curves. If values to be predicted are given, they are calculated from the curve and also displayed within. calib2 uses a bootstrap approach if replicates for the dilutions are supplied. See 'Details'.

Usage

calib(refcurve, predcurve = NULL, thresh = "cpD2", dil = NULL, 
       group = NULL, plot = TRUE, conf = 0.95, B = 200)

Arguments

refcurve

a 'modlist' containing the curves for calibration.

predcurve

an (optional) 'modlist' containing the curves for prediction.

thresh

the fluorescence value from which the threshold cycles are defined. Either "cpD2" or a numeric value.

dil

a vector with the concentration (or dilution) values corresponding to the calibration curves.

group

a factor defining the group membership for the replicates. See 'Examples'.

plot

logical. Should the fitting (bootstrapping) be displayed? If FALSE, only values are returned.

conf

the confidence interval. Defaults to 95%, can be omitted with NULL.

B

the number of bootstraps.

Value

A list with the following components:

eff

the efficiency.

AICc

the second-order corrected AIC.

Rsq.ad

the adjusted \(R^2_{adj}\).

predconc

the (log) concentration of the predicted curves.

conf.boot

a list containing the confidence intervals for the efficiency, the AICc, Rsq.ad and the predicted concentrations.

A plot is also supplied for efficiency, AICc, Rsq.ad and predicted concentrations including confidence intervals in red.

Details

calib2 calculates confidence intervals for efficiency, AICc, adjusted \(R^2_{adj}\) and the prediction curve concentrations. If single replicates per dilution are supplied by the user, confidence intervals for the prediction curves are calculated based on asymptotic normality. If multiple replicates are supplied, the regression curves are calculated by randomly sampling one of the replicates from each dilution group. The confidence intervals are then calculated from the bootstraped results.

Examples

Run this code
# NOT RUN {
## Define calibration curves,
## dilutions (or copy numbers) 
## and curves to be predicted.
## Do background subtraction using
## average of first 8 cycles. No replicates.
CAL <- modlist(reps, fluo = c(2, 6, 10, 14, 18, 22), 
               baseline = "mean", basecyc = 1:8)
COPIES <- c(100000, 10000, 1000, 100, 10, 1)
PRED <- modlist(reps, fluo = c(3, 7, 11), 
                baseline = "mean", basecyc = 1:8)

## Conduct normal quantification using
## the second derivative maximum of first curve.
calib(refcurve = CAL, predcurve = PRED, thresh = "cpD2", 
       dil = COPIES, plot = FALSE) 

## Using a defined treshold value.
#calib(refcurve = CAL, predcurve = PRED, thresh = 0.5, dil = COPIES) 

## Using six dilutions with four replicates/dilution.
# }
# NOT RUN {
#CAL2 <- modlist(reps, fluo = 2:25)
#calib(refcurve = CAL2, predcurve = PRED, thresh = "cpD2", 
#      dil = COPIES, group = gl(6,4)) 
# }

Run the code above in your browser using DataLab