Description Usage Arguments Author(s) Examples
Given a set of regions of the genome, get random intervals for a number of permutations which will be used to determine the null distribution.
1 2 | generateSpace(I, gr, nPermute = 1000, strand.specific = FALSE,
randomize.strand = FALSE, seed = NULL)
|
I |
A GRanges object giving intervals from which to sample from. |
gr |
A GRanges object giving intervals of interest to resample from
|
nPermute |
Number of permutations to run. |
strand.specific |
Whether the random intervals should have be strand specific or not. |
randomize.strand |
When |
seed |
Seed to be used for reproducing the results. |
Leonardo Collado-Torres
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Create some input ranges
library('GenomicRanges')
I <- GRanges(c('chr1', 'chrX'), IRanges(c(1e6, 3e6), width = 1e5), strand =
c('+', '-'))
I
## Intervals of interest to resample from
gr <- GRanges(c('chr1', 'chrX'), IRanges(c(1e6, 3e6), width = 1e3), strand =
c('+', '-'))
gr
## Set the seed if you want to reproduce the random results
set.seed(20140728)
## Obtain space of random intervals
space <- generateSpace(I, gr, nPermute = 1000)
space
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.