getBins {IdeoViz} | R Documentation |
getBins
getBins(chroms, ideo, binLim = NULL, stepSize)
chroms |
(character) chromosomes to generate bins for |
ideo |
(data.frame) ideogram table as generated by |
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
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.
(GRanges) bin ranges in 1-base coordinates
getIdeo()
,avgByBin()
ideo_hg19 <- getIdeo("hg19") chrom_bins <- getBins(c("chr1","chr2","chrX"), ideo_hg19,stepSize=5*100*1000)