binGenome: Function for binning a genome.

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

View source: R/tally.in.ranges.r

Description

Function for generating a GRanges representation of a binning of the genome given in the reference object.

Usage

1
binGenome(reference, binsize = 1e+06, chroms = seqnames(reference))

Arguments

reference

A BSgenome object.

binsize

Size of bins along the genome.

chroms

Which chromosomes to use, defaults to all chromosome described as seqnames of the reference object.

Details

This function creates a GRanges object that represents bins of size binsize along the genome represented by the reference object.

Value

A GRanges object that represents bins of size binsize along the genome represented by the reference object, includes special handling of chromosomes shorter than binsize and the last bin of each chromosome.

Author(s)

Paul Theodor Pyl

See Also

defineBlocks

Examples

1
2
3
library(BSgenome.Hsapiens.NCBI.GRCh38)
bins <- binGenome(Hsapiens, binsize = 100e6, chroms = c("1","2","3","X","MT"))
bins

h5vc documentation built on Nov. 8, 2020, 4:56 p.m.