setfdata-method: Sets fluorescence data vectors to 'RDML' object

Description Arguments Examples

Description

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

Arguments

data

matrix containing in the first column data corresponding to all fluorescence values in the following columns. The name of the first column is the name of variable and names of other column are fdata.names (links to rows at description).

description

output from AsTable function that describes fluorescence data.

fdata.type

'adp' for qPCR, 'mdp' for melting data.

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
## 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 <- 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 = 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)

## End(Not run)


Search within the RDML package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.