Given a list of chromosomes with corresponding sizes, this script will produce (roughly) evenly-sized bins across the chromosomes. It does not account for assembly gaps or the like.
binChroms(binCount, chromSizes)
number of bins (total; *not* per chromosome)
a named list of size (length) for each chromosome.
A data.table object assigning a bin ID to each chromosome region.
chromSizes = c(chr1=249250621, chr2=243199373, chr3=198022430)
cBins = binChroms(1000, chromSizes)