View source: R/circularRandomizeRegions.R
circularRandomizeRegions | R Documentation |
Given a set of regions A and a genome, this function returns a new set of regions created by applying a random spin to each chromosome.
circularRandomizeRegions(A, genome="hg19", mask=NULL, max.mask.overlap=NULL, max.retries=10, verbose=TRUE, ...)
A |
The set of regions to randomize. A region set in any of the accepted formats by |
genome |
The reference genome to use. A valid genome object. Either a |
mask |
The set of regions specifying where a random region can not be (centromeres, repetitive regions, unmappable regions...). A region set in any of the accepted formats by |
max.mask.overlap |
numeric value |
max.retries |
numeric value |
verbose |
a boolean. |
... |
further arguments to be passed to or from methods. |
This randomization strategy is useful when the spatial relation between the regions in the RS is important and has to be conserved.
It returns a GenomicRanges
object with the regions resulting from the randomization process.
randomizeRegions
, toDataframe
, toGRanges
, getGenome
, getMask
, getGenomeAndMask
, characterToBSGenome
, maskFromBSGenome
, resampleRegions
, createRandomRegions
A <- data.frame("chr1", c(1, 10, 20, 30), c(12, 13, 28, 40))
mask <- data.frame("chr1", c(20000000, 100000000), c(22000000, 130000000))
genome <- data.frame(c("chr1", "chr2"), c(1, 1), c(180000000, 20000000))
circularRandomizeRegions(A)
circularRandomizeRegions(A, genome=genome, mask=mask, per.chromosome=TRUE, non.overlapping=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.