Learn R Programming

qpcR (version 1.3-7.1)

calib2: Calculation of qPCR efficiency by dilution curve 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

calib2(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:
  • effthe efficiency.
  • AICcthe second-order corrected AIC.
  • Rsq.adthe adjusted $R^2_{adj}$.
  • predconcthe (log) concentration of the predicted curves.
  • conf.boota 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
## Define calibration curves,
## dilutions (or copy numbers) 
## and curves to be predicted.
## Do background subtraction using
## average of first 8 cycles
CAL <- modlist(reps, fluo = c(2, 6, 10, 14, 18, 22), baseline = 1:8)
COPIES <- c(100000, 10000, 1000, 100, 10, 1)
PRED <- modlist(reps, fluo = c(3, 7, 11), baseline = 1:8)

## conduct normal quantification using
## the second derivative maximum of 
## first curve
res1 <- calib2(refcurve = CAL, predcurve = PRED, thresh = "cpD2", dil = COPIES) 

## using a defined treshold value
res2 <- calib2(refcurve = CAL, predcurve = PRED, thresh = 0.5, dil = COPIES) 

## using six dilutions with 
## four replicates/dilution
CAL2 <- modlist(reps, fluo = 2:25, baseline = 1:8)
res3 <- calib2(refcurve = CAL2, predcurve = PRED, thresh = "cpD2", 
              dil = COPIES, group = gl(6,4))

Run the code above in your browser using DataLab