generateSpace: Obtain the null distribution of a set of intervals

Description Usage Arguments Author(s) Examples

Description

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.

Usage

1
2
generateSpace(I, gr, nPermute = 1000, strand.specific = FALSE,
  randomize.strand = FALSE, seed = NULL)

Arguments

I

A GRanges object giving intervals from which to sample from.

gr

A GRanges object giving intervals of interest to resample from I.

nPermute

Number of permutations to run.

strand.specific

Whether the random intervals should have be strand specific or not.

randomize.strand

When strand.specific=TRUE, whether the strand should be randomized or depend on the strand from the regions in I.

seed

Seed to be used for reproducing the results.

Author(s)

Leonardo Collado-Torres

Examples

 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

leekgroup/enrichedRanges documentation built on June 6, 2019, 7:37 a.m.