getStats: Obtain statistics from a BSseqTstat object

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/getStats.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
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))
}

bsseq documentation built on Nov. 8, 2020, 7:53 p.m.