shuffle: Shuffle

Description Usage Arguments Value Author(s) Examples

View source: R/shuffle.R

Description

Shuffle genomic regions among a defined genome.

Usage

1
2
shuffle(regions, chromSizes = LoadChromSizes("hg38"), universe = NULL,
included = 1, byChrom = FALSE)

Arguments

regions

The genomic ranges object containing the genomic regions to shuffle.

chromSizes=LoadChromSizes("hg38")

A vector containing all the chromosome lengths for the species in consideration.

universe=NULL

A set of genomic regions that prevent shuffles for occuring outside of it.

included=1

Represents the fraction of each regions that can be outside of the universe.

byChrom=FALSE

Will the shuffles stay in the chromosome they originate (TRUE) or can they be placed everywhere on the genome (FALSE)

Value

A genomic ranges containing the new shuffled chromosic regions.

Author(s)

Zacharie Menetrier

Examples

1
2
3
4
regionsFile <- system.file("extdata", "ReMap_nrPeaks_public_chr22.bed",
                            package = "ReMapEnrich")
regions <- bedToGranges(regionsFile)
shuffledRegions <- shuffle(regions)

rtmag/forkedTF documentation built on Nov. 5, 2021, 10 a.m.