View source: R/resampleGenome.R
resampleGenome | R Documentation |
Fast alternative to randomizeRegions. It creates a tiling (binning) of the whole genome with tiles the mean size of the regions in A and then places the regions by sampling a length(A) number of tiles and placing the resampled regions there.
resampleGenome(A, simple = FALSE, per.chromosome = FALSE, genome="hg19", min.tile.width=1000, ...)
A |
an object of class GenomigRanges |
simple |
logical, if TRUE the randomization process will not take into account the specific width of each region in A. (defalut = FALSE) |
per.chromosome |
logical, if TRUE the randomization will be perform by chromosome. (default = TRUE) |
genome |
character or GenomicRanges, genome using for the randomization |
min.tile.width |
integer, the minimum size of the genome tiles. If they are too small, the functions gets very slow and may even fail to work. (default = 1000, 1kb tiles) |
... |
further arguments to be passed to other methods. |
a GenomicRanges
object. A sample from the universe
with the same length as A.
toDataframe
, toGRanges
, randomizeRegions
, createRandomRegions
A <- data.frame(chr=1, start=c(2,12,28,35), end=c(5,25,33,43))
B <- resampleGenome(A)
B
width(B)
B2 <- resampleGenome(A, simple=TRUE)
B2
width(B2)
resampleGenome(A, per.chromosome=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.