BSraw-class {BiSeq} | R Documentation

## Class to contain raw Bisulfite Sequencing (BiSeq) Data

### Description

The `BSraw` class is derived from `RangedSummarizedExperiment` and contains a `SimpleList` of matrices named `methReads` and `totalReads` as `assays`.

### Objects from the Class

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

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 two matrices, named `totalReads` and `methReads`. The matrix `totalReads` contains the number of reads spanning a CpG-site. The rows represent the CpG sites in `rowRanges` and the columns represent the samples in `colData`. The matrix `methReads` contains the number of methylated reads spanning a CpG-site.

### Extends

Class `"RangedSummarizedExperiment"`, directly.

### Methods

totalReads

  `signature(x = "BSraw")`: Gets the `totalReads` slot.

totalReads<-

  `signature(x = "BSraw", value = "matrix")`: Sets the `totalReads` slot.

methReads

  `signature(x = "BSraw")`: Gets the `methReads` slot.

methReads<-

  `signature(x = "BSraw", value = "matrix")`: Sets the `methReads` slot.

combine

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

### Author(s)

Katja Hebestreit

### See Also

RangedSummarizedExperiment, `BSrel-class`, `readBismark`

### Examples

    showClass("BSraw")

    ## How to create a BSraw 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"))
    totalReads <- matrix(c(rep(10L, 3), rep(5L, 3)), ncol = 2)
    methReads <- matrix(c(rep(5L, 3), rep(5L, 3)), ncol = 2)
    BSraw(metadata = metadata,
          rowRanges = rowRanges,
          colData = colData,
          totalReads = totalReads,
          methReads = methReads)

    ## A more realistic example can be loaded:
    data(rrbs)
    rrbs

    head(totalReads(rrbs))
    head(methReads(rrbs))

[Package BiSeq version 1.26.0 Index]