getStats {bsseq} | R Documentation

## Obtain statistics from a BSseqTstat object

### Description

Essentially an accessor function for the statistics of a `BSseqTstat` object.

### Usage

    getStats(bstat, regions = NULL, ...)

### Arguments

`bstat` | An object of class `BSseqStat` or `BSseqTstat`.
`regions` | An optional `data.frame` or `GenomicRanges` object specifying a number of genomic regions.
`...` | Additional arguments passed to the different backends based on the class of `bstat`; see Details.

### Details

Additional argument when the `bstat` object is of class `BSseqTstat`:

stat

  Which statistics column should be obtained.

### Value

An object of class `data.frame` possible restricted to the regions specified.

### Author(s)

Kasper Daniel Hansen khansen@jhsph.edu

### See Also

`BSseqTstat` for the `BSseqTstat` class, and `getCoverage` and `getMeth` for similar functions, operating on objects of class `BSseq`.

### Examples

    if(require(bsseqData)) {
      data(BS.cancer.ex.tstat)
      head(getStats(BS.cancer.ex.tstat))
      reg <- GRanges(seqnames = c("chr22", "chr22"),
         ranges = IRanges(start = c(1, 2*10^7), end = c(2*10^7 +1, 4*10^7)))
      head(getStats(BS.cancer.ex.tstat, regions = reg))
    }

[Package bsseq version 1.18.0 Index]