MahShaaban / pcr

Quality assessing, analyzing and testing the statistical significance of real-time quantitative PCR data
https://CRAN.R-project.org/package=pcr
GNU General Public License v3.0
27 stars 8 forks source link

use pcr package for three sample group experiment #19

Closed janstrauss1 closed 4 years ago

janstrauss1 commented 4 years ago

Hi @MahShaaban,

many thanks for developing pcr!

I'm very keen to use the package to analyze qPCR data for a three sample group comparison (i.e. small time series with three sampling points). Preferably, I would like to use a standard curve method to determine and visualize relative mRNA expression.

Is it possible to do this with the current version of pcr? I'm using pcr_1.2.2.

Many thanks in advance for your help!

Jan

MahShaaban commented 4 years ago

Hi @janstrauss1 I don't see why you can't. You could either use compare pairs of groups (time points) or use a linear model test. Please, have a look at the package vignette and let me know if you have other questions.

janstrauss1 commented 4 years ago

Hi @MahShaaban,

many thanks for your feedback and setting me in the right direction! I just got confused, because most of the examples in the vignette seem to be based on simple two-group comparisons.

Anyways, I'm adding a small example below for a three sample group comparison that I'm intending to do.

### Generate repeatable sequences of random numbers
set.seed(seed = 1)
c_myc_1 <- runif(n = 6, min = 30, max = 31)
c_myc_2 <- runif(n = 6, min = 29, max = 30)
c_myc_3 <- runif(n = 6, min = 27, max = 29)
c_myc <- c(c_myc_1, c_myc_2, c_myc_3)
GAPDH <- runif(n = 18, min = 22, max = 24)
my.data <- data.frame(c_myc, GAPDH)

### add grouping variable
my.group_var <- rep(c("t1","t2","t3"), each = 6) 
# calculate all values and errors in one step
## mode == 'separate_tube' default
my.res <- pcr_analyze(
  df = my.data,
  method = "delta_delta_ct",
  group_var = my.group_var,
  reference_gene = 'GAPDH',
  reference_group = 't1',
  plot = TRUE
  )
my.res

Many thanks again for your help!

Jan