pcr_ddct: Calculate the delta_delta_ct model

Description Usage Arguments Details Value Examples

View source: R/analyses_fun.R

Description

Uses the C_T values and a reference gene and a group to calculate the delta delta C_T model to estimate the normalized relative expression of target genes.

Usage

1
2
3
4
5
6
7
8
9
pcr_ddct(
  df,
  group_var,
  reference_gene,
  reference_group,
  mode = "separate_tube",
  plot = FALSE,
  ...
)

Arguments

df

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

group_var

A character vector of a grouping variable. The length of this variable should equal the number of rows of df

reference_gene

A character string of the column name of a control gene

reference_group

A character string of the control group in group_var

mode

A character string of; 'separate_tube' (default) or 'same_tube'. This is to indicate whether the different genes were run in separate or the same PCR tube

plot

A logical (default is FALSE)

...

Arguments passed to customize plot

Details

The comparative C_T methods assume that the cDNA templates of the gene/s of interest as well as the control/reference gene have similar amplification efficiency. And that this amplification efficiency is near perfect. Meaning, at a certain threshold during the linear portion of the PCR reaction, the amount of the gene of the interest and the control double each cycle. Another assumptions is that, the expression difference between two genes or two samples can be captured by subtracting one (gene or sample of interest) from another (reference). This final assumption requires also that these references don't change with the treatment or the course in question.

Value

A data.frame of 8 columns:

When plot is TRUE, returns a bar graph of the relative expression of the genes in the column and the groups in the column group. Error bars are drawn using the columns lower and upper. When more one gene are plotted the default in dodge bars. When the argument facet is TRUE a separate panel is drawn for each gene.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## 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_ddct(ct1,
         group_var = group_var,
         reference_gene = 'GAPDH',
         reference_group = 'brain')

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

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