# NOT RUN {
PATH <- path.package("RDML")
filename <- paste0(PATH, "/extdata/", "stepone_std.rdml")
cfx96 <- RDML$new(filename)
## Use plotCurves function from the chipPCR package to
## get an overview of the amplification curves
library(chipPCR)
## Extract all qPCR data
tab <- cfx96$AsTable()
tab2 <- tab
tab2$run.id <- "cpp"
cfx96.qPCR <- as.data.frame(cfx96$GetFData(tab))
cpp <- cbind(cyc = cfx96.qPCR[, 1],
apply(cfx96.qPCR[, -1], 2,
function(y) CPP(x = cfx96.qPCR[, 1], y = y)$y.norm))
cfx96$SetFData(cpp, tab2)
library(ggplot2)
library(gridExtra)
cfx96.gg <- cfx96$GetFData(tab, long.table = TRUE)
cpp.gg <- cfx96$GetFData(tab2,
long.table = TRUE)
plot1 <- ggplot(cfx96.gg, aes(x = cyc, y = fluor,
group=fdata.name)) +
geom_line() +
ggtitle("Raw data")
plot2 <- ggplot(cpp.gg, aes(x = cyc, y = fluor,
group=fdata.name)) +
geom_line() +
ggtitle("CPP processed data")
grid.arrange(plot1, plot2, nrow=2)
# }
Run the code above in your browser using DataLab