A function to shuffle GRanges along a given genome Internaly, this function relies on bedTools shuffle, so the bedTools suite has to be installed on the workstation.

shuffleGRanges(granges, genome = NULL,
  opt.shuffle = "-chrom -noOverlapping", exclude_itself = TRUE,
  SEED = 222)

Arguments

granges

A GRanges object to shuffle

genome

a BSgenome object. See getChromSizes for more details

opt.shuffle

string of options (in single quotes) to pass to bedtools shuffle

exclude_itself

Boolean. Should the shuffled GRanges overlap the input GRanges or not?

SEED

Integer. Make shuffling reproducible

Value

a GRanges object with shuffled ranges