Generate random regions

randomRegions(genome = NULL, nr = 1000, seqlengths = NULL,
    width_fun = function(n) runif(n, min = 1000, max = 10000))

Arguments

genome

UCSC genome version, e.g. "hg19".

nr

Number of regions.

seqlengths

Alternatively, you can also specify a named vector of seqlengths (chromosome lengths).

width_fun

A function which defines the distribution of region widths.

Details

The number of regions per chromosome is proportional to the chromsome length.

Examples

gr = randomRegions(genome = "hg19")
quantile(width(gr))
#>       0%      25%      50%      75%     100% 
#>  1038.00  3356.50  5723.50  7889.25 10001.00