addDiffMethTable,RnBDiffMeth-method {RnBeads} | R Documentation

## addDiffMethTable-methods

### Description

Adds a differential methylation table

### Usage

    ## S4 method for signature 'RnBDiffMeth'
    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

### Note

Caveat: if disk dumping is enabled the resulting object tables will be stored in the initial location of the object.

### Author(s)

Fabian Mueller

### Examples

    library(RnBeads.hg19)
    data(small.example.object)
    logger.start(fname=NA)
    dm <- rnb.execute.computeDiffMeth(rnb.set.example,"Sample_Group",c("genes","tiling"))
    s.groups <- rnb.sample.groups(rnb.set.example,"Sample_Group")[[1]]
    dmt.sites <- computeDiffTab.extended.site(meth(rnb.set.example),s.groups[[1]],s.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)

[Package RnBeads version 2.2.0 Index]