An optional function to aggregate cytosine / CpG level data into regions based on a GRanges set of genomic regions.
Arguments
bs a BSseq object.
gr a GRanges of the regions over which to group the CpGs into.
Values
A BSseq-class 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.
Tests
Test for the correct sums in tiles.
Test for inclusion/exclusion of cytosines / CpGs in regions (left or right closed or open), and include that in the documentation once you're sure of the behavior.
Is it possible for a non-destranded CpG pair to be split among neighboring regions?
Notes
This function will be used in tile_by_windows() #31.
Function call
tile_by_regions(bs, gr)
Description
An optional function to aggregate cytosine / CpG level data into regions based on a
GRanges
set of genomic regions.Arguments
bs
aBSseq
object.gr
aGRanges
of the regions over which to group the CpGs into.Values
A
BSseq
-class object with loci of regions matchinggr
. Coverage and methylation read count matrices are aggregated by the sums of the cytosines / CpGs in the regions per sample.Tests
Notes
tile_by_windows()
#31.