Learn R Programming

RDML (version 0.8-3)

SetFData: Sets fluorescence data vectors to RDML object

Description

Sets fluorescence data vectors to RDML object for specified method of experiment.

Arguments

data
matrix that contains in the first column constant data for all fluorescence vectors (i.e. cycle numbers or temperature) and fluorescence values in the following columns. The column name is the name of constant data. Names of other column ar
description
output from AsTable function that describes fluorescence data.

Examples

Run this code
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()
cfx96.qPCR <- 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, tab)
library(ggplot2)
library(gridExtra)
cfx96.gg <- cfx96$GetFData(tab, long.table = TRUE)
cpp.gg <- cfx96$GetFData(tab, fdata.type = "cpp",
                         long.table = TRUE)
plot1 <- ggplot(cfx96.gg, aes(x = cyc, y = fluo,
                group=fdata.name)) +
                 geom_line() +
                 ggtitle("Raw data")
plot2 <- ggplot(cpp.gg, aes(x = cyc, y = fluo,
                group=fdata.name)) +
                 geom_line() +
                 ggtitle("CPP processed data")
grid.arrange(plot1, plot2, nrow=2)

Run the code above in your browser using DataLab