Learn R Programming

qpcR (version 1.3-7.1)

KOD: (K)inetic (O)utlier (D)etection using several methods

Description

Identifies and/or removes qPCR runs according to several published methods or own ideas. The univariate measures are based on efficiency or difference in first/second derivative maxima. Multivariate methods are implemented that describe the structure of the curves according to several fixpoints such as first/second derivative maximum, slope at first derivative maximum or plateau fluorescence. These measures are compared with a set of curves using the mahalanobis distance with a robust covariance matrix and calculation of statistics by a $\chi^2$ distribution. See 'Details'.

Usage

KOD(object, method = c("uni1", "uni2", "multi1", "multi2", "multi3"),
    par = parKOD(), remove = FALSE, verbose = TRUE, plot = TRUE,  ...)

Arguments

object
an object of class 'modlist' or 'replist'.
method
which method to use for kinetic outlier identification. Method "uni1" is default. See 'Details' for all methods.
par
parameters for the different methods. See parKOD.
remove
logical. If TRUE, outlier runs are removed and the object is updated. If FALSE, the individual qPCR runs are tagged as 'outliers' or not. See 'Details'.
verbose
logical. If TRUE, all calculation steps and results are displayed on the console.
plot
logical. If TRUE, a multivariate plot is displayed.
...
any other parameters to be passed to sliwin, efficiency or expfit.

Value

  • An object of the same class as in object that is 'tagged' in its name (**name**) if it is an outlier and also with an item $isOutlier with outlier information (see is.outlier). If remove = TRUE, the outlier runs are removed (and the fitting updated in case of a 'replist').

Details

The following methods for the detection of kinetic outliers are implemented uni1: KOD method according to Bar et al. (2003). Outliers are defined by removing the sample efficiency from the replicate group and testing it against the remaining samples' efficiencies using a Z-test: $$P = 2 * \left[1 - \Phi\left(\frac{e_i - \mu_{train}}{\sigma_{train}}\right)\right] < 0.05$$ uni2: This method from the package author is more or less a test on sigmoidal structure for the individual curves. It is different in that there is no comparison against other curves from a replicate set. The test is simple: The difference between first and second derivative maxima should be less than 10 cycles: $$\left(\frac{\partial^3 F(x;a,b,...)}{\partial x^3} = 0\right) - \left(\frac{\partial^2 F(x;a,b...)}{\partial x^2} = 0\right) < 10$$ Sounds astonishingly simple, but works: Runs are defines as 'outliers' that really failed to amplify, i.e. have no sigmoidal structure or are very shallow. It is the default setting in modlist. multi1: KOD method according to Tichopad et al. (2010). Assuming two vectors with first and second derivative maxima $t_1$ and $t_2$ from a 4-parameter sigmoidal fit within a window of points around the first derivative maximum, a linear model $t_2 = t_1 \cdot b + a + \tau$ is made. Both $t_1$ and the residuals from the fit $\tau = t_2 - \hat{t_2}$ are Z-transformed: $${t_1}_{norm} = \frac{t_1 - \bar{t_1}}{{\sigma_t}_1}, {\tau_1}_{norm} = \frac{\tau_1 - \bar{\tau_1}}{{\sigma_\tau}_1}$$ Both $t_1$ and $\tau$ are used for making a robust covariance matrix. The outcome is plugged into a mahalanobis distance analysis using the 'adaptive reweighted estimator' from package 'mvoutlier' and p-values for significance of being an 'outlier' are deduced from a $\chi^2$ distribution. If more than two parameters are supplied, princomp is used instead. multi2: Second KOD method according to Tichopad et al. (2010), mentioned in the paper. Uses the same pipeline as multi1, but with the slope at the first derivative maximum and maximum fluorescence as parameters: $$\frac{\partial F(x;a,b,...)}{\partial x}, F_{max}$$ multi3: KOD method according to Sisti et al. (2010). Similar to multi2, but uses maximum fluorescence, slope at first derivative maximum and y-value at first derivative maximum as fixpoints: $$\frac{\partial F(x;a,b,...)}{\partial x}, F\left(\frac{\partial^2 F(x;a,b,...)}{\partial x^2} = 0\right), F_{max}$$ All essential parameters for the methods can be tweaked by parKOD. See there and in 'Examples'.

References

Kinetic Outlier Detection (KOD) in real-time PCR. Bar T, Stahlberg A, Muszta A & Kubista M. Nucl Acid Res (2003), 31: e105. Quality control for quantitative PCR based on amplification compatibility test. Tichopad A, Bar T, Pecen L, Kitchen RR, Kubista M &, Pfaffl MW. Methods (2010), 50: 308-312. Shape based kinetic outlier detection in real-time PCR. Sisti D, Guescini M, Rocchi MBL, Tibollo P, D'Atri M & Stocchi V. BMC Bioinformatics (2010), 11: 186.

See Also

Function is.outlier to get an outlier summary.

Examples

Run this code
## kinetic outliers:
## on a 'modlist', using efficiency from sigmoidal fit
## and alpha = 0.01. 
## F7.3 detected as outlier (shallower => low efficiency)
ml1 <- modlist(reps, 1, c(2:5, 28), model = l5)
res1 <- KOD(ml1, method = "uni1", par = parKOD(eff = "sliwin", alpha = 0.01))
plot(res1)

## sigmoidal outliers:
## remove runs without sigmoidal structure
ml2 <- modlist(testdat, model = l5)
res2 <- KOD(ml2, method = "uni2", remove = TRUE)
plot(res2, which = "single")

## multivariate outliers:
## a few runs are identified
ml3 <- modlist(reps, model = l5)
res3 <- KOD(ml3, method = "multi1")

## on a 'replist',
## several outliers identified
rl3 <- replist(ml3, group = gl(7, 4))
res4 <- KOD(rl3, method = "uni1")

Run the code above in your browser using DataLab