tile_by_regions: Group cytosine / CpG level data into regions based on genomic...

Description Usage Arguments Value Examples

View source: R/tile_by_regions.R

Description

An optional function to aggregate cytosine / CpG level data into regions based on a GRanges set of genomic regions.

Usage

1

Arguments

bs

a BSseq object.

gr

a GRanges object.

Value

A BSseq object with loci of regions matching gr. Coverage and methylation read count matrices are aggregated by the sums of the cytosines / CpGs in the regions per sample.

Examples

1
2
3
4
5
6
7
8
9
data(bsseq_stranded, package = 'methylSig')
regions = GenomicRanges::GRanges(
    seqnames = c('chr1','chr1','chr1'),
    ranges = IRanges::IRanges(
        start = c(5,35,75),
        end = c(30,70,80)
    )
)
tiled = tile_by_regions(bs = bsseq_stranded, gr = regions)

methylSig documentation built on Nov. 8, 2020, 8:25 p.m.