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

Description Usage Arguments Details Value Author(s) References See Also Examples

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 χ^2 distribution. See 'Details'.

Usage

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

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 \cdot ≤ft[1 - Φ≤ft(\frac{e_i - μ_{train}}{σ_{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:

≤ft(\frac{\partial^3 F(x;a,b,...)}{\partial x^3} = 0\right) - ≤ft(\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 + τ is made. Both t_1 and the residuals from the fit τ = t_2 - \hat{t_2} are Z-transformed:

t_1(norm) = \frac{t_1 - \bar{t}_1}{{σ_t}_1}, \; {τ_1}_{norm} = \frac{τ_1 - \bar{τ}_1}{{σ_τ}_1}

Both t_1 and τ 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 χ^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≤ft(\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'.

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

Author(s)

Andrej-Nikolai Spiess

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

 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
## 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")

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

## 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'. 
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 F7.3 (l5)
 => Fitting passed...

Calculating delta of first/second derivative maxima...
.....
Calculating efficiencies...
.....
Calculating Z-Score...
Calculating univariate outlier(s)...
 Found univariate outlier for F7.3 
 Tagging name of F7.3 ...
[1] "modlist" "pcrfit" 
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 failed. Tagging name of F2.3...

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 failed. Tagging name of F6.3...

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

Calculating delta of first/second derivative maxima...
.........10.........20....
 Found univariate outlier for F1.4 F2.4 F4.4 
 Tagging name of F1.4 F2.4 F4.4 ...
Calculating delta of first/second derivative maxima...
.........10.........20....
 Found univariate outlier for **F1.4** **F2.4** **F4.4** 
 Removing **F1.4** **F2.4** **F4.4** ...
[1] "modlist" "pcrfit" 
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........
Calculating first and second derivative maxima...
.........10.........20........
Making linear model between cpD1 and cpD2...
Calculating multivariate outlier(s)...
 Found multivariate outlier for F5.3 F7.3 F7.4 
 Tagging name of F5.3 F7.3 F7.4 ...
Making model for replicates: F1.1 F1.2 F1.3 F1.4 => l5 
 => Fitting passed...

Making model for replicates: F2.1 F2.2 F2.3 F2.4 => l5 
 => Fitting passed...

Making model for replicates: F3.1 F3.2 F3.3 F3.4 => l5 
 => Fitting passed...

Making model for replicates: F4.1 F4.2 F4.3 F4.4 => l5 
 => Fitting passed...

Making model for replicates: F5.1 F5.2 F5.3 F5.4 => l5 
 => Fitting passed...

Making model for replicates: F6.1 F6.2 F6.3 F6.4 => l5 
 => Fitting passed...

Making model for replicates: F7.1 F7.2 F7.3 F7.4 => l5 
 => Fitting passed...

Calculating efficiencies...
....
Calculating Z-Score...
Calculating univariate outlier(s)...
 Found univariate outlier for F1.3 
 Tagging name of F1.3 ...

Calculating efficiencies...
....
Calculating Z-Score...
Calculating univariate outlier(s)...
 Found univariate outlier for F2.3 
 Tagging name of F2.3 ...

Calculating efficiencies...
....
Calculating Z-Score...
Calculating univariate outlier(s)...
 Found univariate outlier for F3.3 
 Tagging name of F3.3 ...

Calculating efficiencies...
....
Calculating Z-Score...
Calculating univariate outlier(s)...
 Found univariate outlier for F4.3 
 Tagging name of F4.3 ...

Calculating efficiencies...
....
Calculating Z-Score...
Calculating univariate outlier(s)...
 Found univariate outlier for F5.3 
 Tagging name of F5.3 ...

Calculating efficiencies...
....
Calculating Z-Score...
Calculating univariate outlier(s)...

Calculating efficiencies...
....
Calculating Z-Score...
Calculating univariate outlier(s)...

Updating object of class 'replist':
Removing **F1.3** **F2.3** **F3.3** **F4.3** **F5.3** prior to fitting...

Making model for replicates: F1.1 F1.2 F1.4 => l5 
 => Fitting passed...

Making model for replicates: F2.1 F2.2 F2.4 => l5 
 => Fitting passed...

Making model for replicates: F3.1 F3.2 F3.4 => l5 
 => Fitting passed...

Making model for replicates: F4.1 F4.2 F4.4 => l5 
 => Fitting passed...

Making model for replicates: F5.1 F5.2 F5.4 => l5 
 => Fitting passed...

Making model for replicates: F6.1 F6.2 F6.3 F6.4 => l5 
 => Fitting passed...

Making model for replicates: F7.1 F7.2 F7.3 F7.4 => l5 
 => Fitting passed...

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

Related to KOD in qpcR...