totData: Aggregation of qPCR biological replicates and data...

Description Usage Arguments Details Value Author(s) References Examples

Description

This function aggregates qPCR biological replicates and calculates the main parameters : mean (arithmetic or geometric), the standard deviation and the standard error from your biological replicates of your experience. This function has an algorithm published by Willems et al. (2008) which performs a standardization procedure that can be applied to data sets that display high variation between biological replicates. This enables proper statistical analysis and drawing relevant conclusions. The procedure is not new, it has been used in microarray data analysis and is based on a series of sequential corrections, including log transformation, mean centering, and autoscaling.

Usage

1
2
totData(data, r, geo = TRUE, logarithm = TRUE, base, transformation = TRUE,
	nSpl, linear = TRUE, na.rm = na.rm)

Arguments

data

data.frame containing row datas (genes in columns, samples in rows, Cq values).

r

numeric, number of qPCR replicates.

geo

logical, the function will use the geometrical mean of your biological replicates if TRUE or the arithmetic mean if FALSE.

logarithm

logical, the NRQs will be log-transformed.

base

numeric, the logarithmic base (2 or 10).

transformation

logical, if TRUE, the transformation procedure for highly variable biological replicates (but with the same tendency) will be done.

nSpl

numeric, the number of samples.

linear

logical, after the transformation procedure done, your raw data will be normalized (anti-log-transformed).

na.rm

logical, indicating whether NA values should be stripped before the computation proceeds.

Details

The standardization procedure used in this function (if TRUE for the transformation argument) is based on the article of Willems et al. (2008). This function perform successively thEerror operations : log-transformation of your raw data, mean of your log-transformed data for each biological replicate, mean centering for each biological replicate, standard deviation of each mean-centered biological replicate, autoscaling of your data, i.e., your mean-centered data for each biological replicate will be divided by the standard deviation of the mean-centered biological replicate and then multiplicated by the mean of the standard deviation of all the biological replicates.

For more information for the way to use this function, please see the vignette.

Value

Mean of your qPCR runs

The geometric (if TRUE for geo) or arithmetic mean of your biological replicates.

Standard deviations of your qPCR runs

The standard deviation of your biological replicates.

Standard errors of your qPCR runs

The standard error of your biological replicates.

Transformed data

If TRUE for transformation, your raw data will be transformed by the algorithm of Willems et al. (2008).

Reordered transformed data

The transformed data reordered by rowname.

Author(s)

Sylvain Le pape <sylvain.le.pape@univ-poitiers.fr>

References

Erik Willems Luc Leyns, Jo Vandesompele. Standardization of real-time PCR gene expression data from independent biological replicates. Analytical Biochemistry 379 (2008) 127-129 (doi:10.1016/j.ab.2008.04.036). <url:http://www.sciencedirect.com/science/article/pii/S0003269708002649>

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
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
data(qPCR_run1,qPCR_run2,qPCR_run3)

nrmData(data = qPCR_run1 , r=3, E=c(2, 2, 2, 2), 
	      Eerror=c(0.02, 0.02, 0.02, 0.02), nSpl=5, 
	      nbRef=2, Refposcol=1:2, nCTL=2, 
	      CF=c(1, 1, 1, 1), CalPos=5, trace=TRUE, geo=TRUE, na.rm=TRUE)

nrmData(data = qPCR_run2 , r=3, E=c(2, 2, 2, 2), 
	      Eerror=c(0.02, 0.02, 0.02, 0.02), nSpl=5, 
	      nbRef=2, Refposcol=1:2, nCTL=2, 
	      CF=c(1, 1, 1, 1), CalPos=5, trace=TRUE, geo=TRUE, na.rm=TRUE)

nrmData(data = qPCR_run3 , r=3, E=c(2, 2, 2, 2), 
	      Eerror=c(0.02, 0.02, 0.02, 0.02), nSpl=5, 
	      nbRef=2, Refposcol=1:2, nCTL=2, 
	      CF=c(1, 1, 1, 1), CalPos=5, trace=TRUE, geo=TRUE, na.rm=TRUE)


## Isolate the calibrator NRQ values of the first biological replicate

a <- nrmData(data = qPCR_run1 , r=3, E=c(2, 2, 2, 2), 
	      Eerror=c(0.02, 0.02, 0.02, 0.02), nSpl=5, 
	      nbRef=2, Refposcol=1:2, nCTL=2, 
	      CF=c(1, 1, 1, 1), CalPos=5, trace=TRUE, geo=TRUE, na.rm=TRUE)[[3]] 

## Isolate the calibrator NRQ values of the first biological replicate

b <- nrmData(data = qPCR_run2 , r=3, E=c(2, 2, 2, 2), 
	      Eerror=c(0.02, 0.02, 0.02, 0.02), nSpl=5, 
	      nbRef=2, Refposcol=1:2, nCTL=2, 
	      CF=c(1, 1, 1, 1), CalPos=5, trace=TRUE, geo=TRUE, na.rm=TRUE)[[3]]
 
## Isolate the calibrator NRQ values of the first biological replicate

c <- nrmData(data = qPCR_run3 , r=3, E=c(2, 2, 2, 2), 
	      Eerror=c(0.02, 0.02, 0.02, 0.02), nSpl=5, 
	      nbRef=2, Refposcol=1:2, nCTL=2, 
	      CF=c(1, 1, 1, 1), CalPos=5, trace=TRUE, geo=TRUE, na.rm=TRUE)[[3]]

## Regrouping the calibrator NRQ values of all the biological replicates

d <- rbind(a, b, c) 

## Calibration factor calculation

e <- calData(d) 


## Attenuation of inter-run variation thanks to the calibration factor for the
## first biological replicate

nrmData(data = qPCR_run1 , r=3, E=c(2, 2, 2, 2), 
	      Eerror=c(0.02, 0.02, 0.02, 0.02), nSpl=5, 
	      nbRef=2, Refposcol=1:2, nCTL=2, 
	      CF=e, CalPos=5, trace=TRUE, geo=TRUE, na.rm=TRUE)

## Attenuation of inter-run variation thanks to the calibration factor for the
## second biological replicate

nrmData(data = qPCR_run2 , r=3, E=c(2, 2, 2, 2), 
	      Eerror=c(0.02, 0.02, 0.02, 0.02), nSpl=5, 
	      nbRef=2, Refposcol=1:2, nCTL=2, 
	      CF=e, CalPos=5, trace=TRUE, geo=TRUE, na.rm=TRUE) 

## Attenuation of inter-run variation thanks to the calibration factor for the
## third biological replicate

nrmData(data = qPCR_run3 , r=3, E=c(2, 2, 2, 2), 
	      Eerror=c(0.02, 0.02, 0.02, 0.02), nSpl=5, 
	      nbRef=2, Refposcol=1:2, nCTL=2, 
	      CF=e, CalPos=5, trace=TRUE, geo=TRUE, na.rm=TRUE) 

## Isolate the NRQs scaled to control of the first biological replicate

a1 <- nrmData(data = qPCR_run1 , r=3, E=c(2, 2, 2, 2), 
	      Eerror=c(0.02, 0.02, 0.02, 0.02), nSpl=5, 
	      nbRef=2, Refposcol=1:2, nCTL=2, 
	      CF=e, CalPos=5, trace=TRUE, geo=TRUE, na.rm=TRUE)[1] 

## Isolate the NRQs scaled to control of the second biological replicate 

b1 <- nrmData(data = qPCR_run2 , r=3, E=c(2, 2, 2, 2), 
	      Eerror=c(0.02, 0.02, 0.02, 0.02), nSpl=5, 
	      nbRef=2, Refposcol=1:2, nCTL=2, 
	      CF=e, CalPos=5, trace=TRUE, geo=TRUE, na.rm=TRUE)[1] 

## Isolate the NRQs scaled to control of the third biological replicate

c1 <- nrmData(data = qPCR_run3 , r=3, E=c(2, 2, 2, 2), 
	      Eerror=c(0.02, 0.02, 0.02, 0.02), nSpl=5, 
	      nbRef=2, Refposcol=1:2, nCTL=2, 
	      CF=e, CalPos=5, trace=TRUE, geo=TRUE, na.rm=TRUE)[1]

## Data frame transformation

a2 <- as.data.frame(a1)
b2 <- as.data.frame(b1)
c2 <- as.data.frame(c1)

## Aggregation of the three biological replicates

d2 <- rbind(a2, b2, c2)

totData(data=d2, r=3, geo=TRUE, logarithm=TRUE, base=2, 
	transformation=TRUE, nSpl=5, linear=TRUE,
	na.rm=TRUE)

slepape/EasyqpcR documentation built on May 31, 2019, 12:13 p.m.