randomize_regions | R Documentation |
randomize_regions
is a wrapper function for regioneR::randomizeRegions()
that simplifies the creation of randomized regions for an input set of regions read with read_regions()
. It relies on the seqlengths
of regions
in order to build the appropriate genome
object for regioneR::randomizeRegions()
.
randomize_regions(
regions,
allow.overlaps = TRUE,
per.chromosome = TRUE,
quiet = FALSE
)
regions |
A |
allow.overlaps |
A logical stating whether random regions can overlap input regions (TRUE) or not (FALSE). Default TRUE. |
per.chromosome |
A logical stating whether the random regions should remain on the same chromosome (TRUE) or not (FALSE). Default TRUE. |
quiet |
Print progress messages (FALSE) or not (TRUE). |
NOTE: The data associated with the input regions
are not passed on to the random regions.
A GRanges
object of randomized regions based on regions
from read_regions()
. NOTE: Data associated with the original regions is not attached to the randomized regions.
# Create random region set based on ENCODE ChIP-seq data
file = system.file('extdata', 'Gm12878_Stat3_chr2.bed.gz', package = 'annotatr')
r = read_regions(con = file, genome = 'hg19')
random_r = randomize_regions(regions = r)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.