BSrel-class {BiSeq} | R Documentation

## Class to contain Bisulfite Sequencing (BiSeq) Data

### Description

The `BSrel` class is derived from `RangedSummarizedExperiment` and contains a `SimpleList` of one matrix named `methLevel` as `assays`.

### Objects from the Class

Objects can be created by calls of the form `BSrel(metadata = list(), rowRanges, colData = DataFrame(row.names=colnames(methLevel)), methLevel, ...)`.

However, one will most likely create a `BSraw` object when use `readBismark` to load data.

### Slots

`metadata`:

  An optional `list` of arbitrary content describing the overall experiment.

`rowRanges`:

  Object of class `"GRanges"` containing the genome positions of CpG-sites covered by bisulfite sequencing. WARNING: The accessor for this slot is `rowRanges`, not `rowRanges`!

`colData`:

  Object of class `"DataFrame"` containing information on variable values of the samples.

`assays`:

  Object of class `SimpleList` of a matrix, named `methLevel` containing the methylation levels (between 0 and 1) per CpG site. The rows represent the CpG sites in `rowRanges` and the columns represent the samples in `colData`.

### Extends

Class `"RangedSummarizedExperiment"`, directly.

### Methods

methLevel

  `signature(x = "BSrel")`: Gets the `methLevel` slot.

methLevel<-

  `signature(x = "BSrel", value = "matrix")`: Sets the `methLevel` slot.

combine

  `signature(x = "BSrel", y = "BSrel")`: Combines two `BSrel` objects.

### Author(s)

Katja Hebestreit

### See Also

RangedSummarizedExperiment, `BSraw-class`, `readBismark`

### Examples

    showClass("BSrel")

    ## How to create a BSrel object by hand:
    metadata <- list(Sequencer = "Sequencer", Year = "2013")
    rowRanges <- GRanges(seqnames = "chr1",
                      ranges = IRanges(start = c(1,2,3), end = c(1,2,3)))
    colData <- DataFrame(group = c("cancer", "control"),
                         row.names = c("sample_1", "sample_2"))
    methLevel <- matrix(c(rep(0.5, 3), rep(1, 3)), ncol = 2)
    BSrel(metadata = metadata,
          rowRanges = rowRanges,
          colData = colData,
          methLevel = methLevel)

    # Or get a BSrel object out of a BSraw object:
    data(rrbs)
    rrbs.rel <- rawToRel(rrbs)

[Package BiSeq version 1.26.0 Index]