resampleRegions: Resample Regions

Description Usage Arguments Value See Also Examples

View source: R/resampleRegions.R

Description

Function for sampling a region set from a univers of region sets.

Usage

1
resampleRegions(A, universe, per.chromosome=FALSE, ...)

Arguments

A

a region set in any of the formats accepted by toGRanges (GenomicRanges, data.frame, etc...)

universe

a region set in any of the formats accepted by toGRanges (GenomicRanges, data.frame, etc...)

per.chromosome

boolean indicating if sample must be by chromosome.

...

further arguments to be passed to or from methods.

Value

a GenomicRanges object. A sample from the univers with the same length as A.

See Also

toDataframe, toGRanges, randomizeRegions, createRandomRegions

Examples

1
2
3
4
5
6
universe <- data.frame(chr=1, start=c(1,15,24,40,50), end=c(10,20,30,45,55))

A <- data.frame(chr=1, start=c(2,12,28,35), end=c(5,25,33,43))

resampleRegions(A, universe, per.chromosome=TRUE)
 

regioneR documentation built on Nov. 8, 2020, 5 p.m.