Learn R Programming

h5vc (version 2.6.3)

binGenome: Function for binning a genome.

Description

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

Usage

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.

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.

Details

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

See Also

defineBlocks

Examples

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

Run the code above in your browser using DataLab