bin_granges: Bins each region in a 'GRanges' object into bins of specified...

Description Usage Arguments Details Value Examples

View source: R/coord_ops.R

Description

Bins each region in a GRanges object into bins of specified bin_size

Usage

1
bin_granges(gr, bin_size = 1e+05)

Arguments

gr

GRanges; The GRanges object

bin_size

integer; x > 0; The length of region in each bin

Details

Bins a single region in GRanges format into multiple regions with a specified bin_size. If length(gr) %% bin_size != 0, then the last GRange will have a length < bin_size. This is used instead of tile when you need consistently sized bins with the last bin being smaller

Value

GRangesList containing all the binned GRanges

Examples

1
2
regions <- GenomicRanges::GRanges(seqnames = "chr1", ranges = IRanges(1,10000))
bin_granges(regions,bin_size=1000) 

CompEpigen/scMethrix documentation built on Nov. 6, 2021, 3:09 p.m.