binChroms: Naively splits a chromosome into bins

View source: R/chrom-plots.R

binChromsR Documentation

Naively splits a chromosome into bins

Description

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.

Usage

binChroms(binCount, chromSizes)

Arguments

binCount

number of bins (total; *not* per chromosome)

chromSizes

a named list of size (length) for each chromosome.

Value

A data.table object assigning a bin ID to each chromosome region.

Examples

chromSizes = c(chr1=249250621, chr2=243199373, chr3=198022430)
cBins = binChroms(1000, chromSizes)


databio/GenomicDistributions documentation built on April 30, 2024, 4:34 a.m.