SimulatePeaks: SimulatePeaks

View source: R/SimulatePeaks.R

SimulatePeaksR Documentation

SimulatePeaks

Description

This function generates a GRanges object with randomly chosen ranges in the genome.

Usage

SimulatePeaks(nSites, peak.widths, chromosomeSizes)

Arguments

nSites

Integer scalar giving the number of desired output ranges.

peak.widths

A numeric vector of the length given in nSites containing the desired width of the ranges.

chromosomeSizes

A table with two columns: chromosome name, length of the chromosome. This defines the search space for choosing random regions.

Details

This function can be used to shuffle peak regions of your ChIP data to random locations in the mouse genome. These random peaks can be used as control regions for further analysis, for example, when testing the overlap of your peaks with genomic annotations (genes, repeats,...).

Value

A GRanges object of randomly chosen genomic ranges of length nSites with widths peak.widths.

Examples

SimulatePeaks(1000,rep(100,1000),chromosomeSizes=
system.file("extdata", "chrNameLength_mm10_chr11.txt", package = "MiniChip"))


fmi-basel/gbuehler-MiniChip documentation built on June 13, 2025, 6:15 a.m.