reposition: move all ranges in a GRanges to randomly chosen chromosomes...

Description Usage Arguments Details Value Note Examples

View source: R/reposition.R

Description

move all ranges in a GRanges to randomly chosen chromosomes with new starting positions

Usage

1
reposition(gr, backoff = -20000)

Arguments

gr

a GRanges-class instance

backoff

an integer in bases to move a range whose end hangs over end of chromosome

Details

Purpose is to obtain a set of ranges with widths identical to gr, but randomly relocated over the genome

Value

A GRanges

Note

It would be nice to be able to reposition to locations that are remote but that share certain characteristics like GC proportion ...

Currently if a chromosome is not represented in gr it is not a candidate for hosting a repositioned range.

Examples

1
2
3
set.seed(1234)
gr = GRanges(c("chr1", "chr4"), IRanges(c(50000, 100000), c(100000, 200000)))
reposition(gr)

genomicsclass/ph525x documentation built on Jan. 14, 2018, 12:09 a.m.