getBins {IdeoViz} | R Documentation

## getBins

### Description

getBins

### Usage

    getBins(chroms, ideo, binLim = NULL, stepSize)

### Arguments

`chroms` | (character) chromosomes to generate bins for
`ideo` | (data.frame) ideogram table as generated by `getIdeo()`. See that function for details.
`stepSize` | (integer) bin size in bases
`binLim` | (numeric,

length 2) [start, end] of genomic range to generate bins for. A value of NULL results in binning of entire chromosome

### Details

Get uniformly-sized bins of specified width This is a helper function used to generate binned data for `plotOnIdeo()`. It takes the chromosome-wide extents from ideo, which is essentially the cytoBandIdeo table from UCSC browser with the header as the first row. A use case is to generate bins using this function and supply the output to `avgByBin()` to bin the data.

### Value

(GRanges) bin ranges in 1-base coordinates

### See Also

`getIdeo()`,`avgByBin()`

### Examples

    ideo_hg19 <- getIdeo("hg19")
    chrom_bins <- getBins(c("chr1","chr2","chrX"), ideo_hg19,stepSize=5*100*1000)

[Package IdeoViz version 1.16.0 Index]