pcr_analyze: Apply qPCR analysis methods

Description Usage Arguments Details Value References Examples

View source: R/analyses_fun.R

Description

A unified interface to invoke different analysis methods of qPCR data.

Usage

1
pcr_analyze(df, method = "delta_delta_ct", ...)

Arguments

df

A data.frame of C_T values with genes in the columns and samples in rows rows

method

A character string; 'delta_delta_ct' default, 'delta_ct' or 'relative_curve' for invoking a certain analysis model

...

Arguments passed to the methods

Details

The different analysis methods can be invoked using the argument method with 'delta_delta_ct' default, 'delta_ct' or 'relative_curve' for the double delta C_T, delta ct or the standard curve model respectively. Alternatively, the same methods can be applied by using the corresponding functions directly: pcr_ddct, pcr_dct or pcr_curve

Value

A data.frame by default, when plot is TRUE returns a plot. For details; pcr_ddct, pcr_dct and pcr_curve.

References

Livak, Kenneth J, and Thomas D Schmittgen. 2001. “Analysis of Relative Gene Expression Data Using Real-Time Quantitative PCR and the Double Delta CT Method.” Methods 25 (4). ELSEVIER. doi:10.1006/meth.2001.1262.

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
# applying the delta delta ct method
## locate and read raw ct data
fl <- system.file('extdata', 'ct1.csv', package = 'pcr')
ct1 <- read.csv(fl)

# add grouping variable
group_var <- rep(c('brain', 'kidney'), each = 6)

# calculate all values and errors in one step
pcr_analyze(ct1,
            group_var = group_var,
            reference_gene = 'GAPDH',
            reference_group = 'brain',
            method = 'delta_delta_ct')

# return a plot
pcr_analyze(ct1,
            group_var = group_var,
            reference_gene = 'GAPDH',
            reference_group = 'brain',
            method = 'delta_delta_ct',
            plot = TRUE)

# applying the delta ct method
# make a data.frame of two identical columns
pcr_hk <- data.frame(
  GAPDH1 = ct1$GAPDH,
  GAPDH2 = ct1$GAPDH
  )

# calculate fold change
pcr_analyze(pcr_hk,
            group_var = group_var,
            reference_group = 'brain',
            method = 'delta_ct')

# return a plot
pcr_analyze(pcr_hk,
            group_var = group_var,
            reference_group = 'brain',
            method = 'delta_ct',
            plot = TRUE)

# applying the standard curve method
# locate and read file
fl <- system.file('extdata', 'ct3.csv', package = 'pcr')
ct3 <- read.csv(fl)

# make a vector of RNA amounts
amount <- rep(c(1, .5, .2, .1, .05, .02, .01), each = 3)

# calculate curve
standard_curve <- pcr_assess(ct3, amount = amount, method = 'standard_curve')
intercept <- standard_curve$intercept
slope <- standard_curve$slope

# apply the standard curve method
pcr_analyze(ct1,
           group_var = group_var,
           reference_gene = 'GAPDH',
           reference_group = 'brain',
           intercept = intercept,
           slope = slope,
           method = 'relative_curve')

# return a plot
pcr_analyze(ct1,
           group_var = group_var,
           reference_gene = 'GAPDH',
           reference_group = 'brain',
           intercept = intercept,
           slope = slope,
           method = 'relative_curve',
           plot = TRUE)

pcr documentation built on April 1, 2020, 9:07 a.m.