astable-method: Represents fields of 'RDML' object as 'data.frame'

Description Arguments Details Author(s) Examples

Description

Formats particular fields of RDML object as data.frames, filters or passes them to RDML.GetFData and RDML.SetFData functions.

Arguments

.default

list of default columns

name.pattern

expression to form fdata.name (see Examples)

add.columns

list of additional columns

treat.null.as.na

if value is NULL then convert it to NA. Helps to deal with incomplete records.

...

additional columns

Details

By default input this function forms data.frame with following columns:

exp.id

experiment$id

run.id

run$id

react.id

react$id

position

react$position

sample

react$sample

target

data$tar$id

target.dyeId

target[[data$id]]$dyeId

sample.type

sample[[react$sample]]$type

You can overload default columns list by parameter .default but note that columns

1
exp.id, run.id, react.id, target

are necessary for usage AsTable output as input for GetFData and SetFData.
Additional columns can be introduced by specifying them at input parameter ... (see Examples). All default and additional columns accession expressions must be named.

Experiment, run, react and data to which belongs each fluorescence data vector can be accessed by experiment, run, react, data (see Examples).

Result table does not contain data from experiments with ids starting with '.'!

Author(s)

Konstantin A. Blagodatskikh <k.blag@yandex.ru>, Stefan Roediger <stefan.roediger@b-tu.de>, Michal Burdukiewicz <michalburdukiewicz@gmail.com>

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
33
## Not run: 
## internal dataset stepone_std.rdml (in 'data' directory)
## generated by Applied Biosystems Step-One. Contains qPCR data.
library(chipPCR)
PATH <- path.package("RDML")
filename <- paste(PATH, "/extdata/", "stepone_std.rdml", sep ="")
stepone <- RDML$new(filename)
## Mark fluorescense data which Cq > 30 and add quantities to
## AsTable output.
## Names for fluorescense data will contain sample name and react
## positions
tab <- stepone$AsTable(
         name.pattern = paste(react$sample$id, react$position),
         add.columns = list(cq30 = if(data$cq >= 30) ">=30" else "<30",
         quantity = sample[[react$sample$id]]$quantity$value)
         )
## Show cq30 and quantities
tab[, c("cq30", "quantity")]
## Get fluorescence values for 'std' type samples
## in format ready for ggplot function
library(dplyr)
fdata <- stepone$GetFData(
           filter(tab, sample.type == "std"),
           long.table = TRUE)
## Plot fdata with colour by cq30 and shape by quantity
library(ggplot2)
ggplot(fdata, aes(x = cyc, y = fluor,
                  group = fdata.name,
                  colour = cq30,
                  shape = as.factor(quantity))) +
                  geom_line() + geom_point()

## End(Not run)

RDML documentation built on June 25, 2019, 5:03 p.m.