gapPeaks: Concatenate Peaks within a User-specified Distance

Description Usage Arguments Value Author(s) Examples

View source: R/gapPeaks.R

Description

Part of the waveseq workflow. This function reads in a file containing peak locations and a user-defined distance (gap*winsize) and concatenates peaks separated by at most 'gap' windows. This is useful for data having broad enrichment patterns as a single large enrichment region can be called as several disjoint peaks. Analyzes peaks chromosome-by-chromosome.

Usage

1
gapPeaks(peaks, outfile, gap, winsize = 200)

Arguments

peaks

Data frame or file containing peak locations. Must be in bedGraph format.

outfile

Output file containing gapped peaks (default=NA).

gap

Maximum number of non-significant windows separating peaks that are to be concatenated.

winsize

Window size used for obtaining peaks(default = 200 bp).

Value

If outfile is not 'NA', returns data frame with peak locations and reads in four columns: <chr> <start> <end> <reads>.

Author(s)

Apratim Mitra

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(WaveSeqR)

# load peak list into memory
data(gabp_peaks)

# get file names
WS.path <- system.file(package = "WaveSeqR")
gap.file <- file.path(WS.path,"data","gabp_valouev2008_chr22-15m-30m_peaks_gap2.txt")

# concatenate peaks separated by 2 non-significant windows
#gapPeaks(peaks=peaks.file, outfile=gap.file, gap=2,winsize=200)
gapPeaks(peaks=gabp_peaks, outfile=gap.file, gap=2,winsize=200)

WaveSeqR documentation built on May 2, 2019, 5:19 p.m.