Learn R Programming

RnBeads (version 1.4.0)

addDiffMethTable,RnBDiffMeth-method: addDiffMethTable-methods

Description

Adds a differential methylation table

Usage

"addDiffMethTable"(object, dmt, comparison, region.type, grp.labs = c("group1", "group2"))

Arguments

object
RnBDiffMeth object
dmt
Differential methylation table to add
comparison
character or index of the comparison of the table to retrieve
region.type
character or index of the region type of the table to retrieve
grp.labs
character vector of length 2 specifying the names of the groups being compared

Value

the updated RnBDiffMeth object

Examples

Run this code

library(RnBeads.hg19)
data(small.example.object)
logger.start(fname=NA)
dm <- rnb.execute.computeDiffMeth(rnb.set.example,pheno.cols="Sample_Group",region.types=c("genes","tiling"))
sample.groups <- rnb.sample.groups(rnb.set.example,"Sample_Group")[[1]]
dmt.sites <- computeDiffTab.extended.site(meth(rnb.set.example),sample.groups[[1]],sample.groups[[2]])
map.regions.to.sites <- regionMapping(rnb.set.example,"promoters")
dmt.promoters <- computeDiffTab.default.region(dmt.sites,map.regions.to.sites)
cmp.name <- get.comparisons(dm)[1]
grp.labs <- get.comparison.grouplabels(dm)[1,]
#add the promoter level differential methylation table
dm.add <- addDiffMethTable(dm,dmt.promoters,cmp.name,"promoters",grp.labs)
get.region.types(dm.add)

Run the code above in your browser using DataLab