compareWithControl: Compare ChIP to Control

Description Usage Arguments Details Value Warning Author(s) See Also

View source: R/compareWithControl.R

Description

Part of the controlFDR function. This function reads in a list of putative peaks, fetches reads in those regions from the control data and compares the two using a two-sided exact Binomial test. Both sets of reads are normalized to per million mapped reads before performing the test.

Usage

1
compareWithControl(peaks, chip, control, winsize = 200, minreads = 8, binom.sided = "two.sided")

Arguments

peaks

File containing peak locations. Must be in bedGraph format.

chip

Padded bedGraph file for the ChIP data being analyzed.

control

Padded bedGraph file for the control data being analyzed.

winsize

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

minreads

Minimum reads in a peak (default = 8). This filtering is necessary for a more accurate estimation of false discovery rate.

binom.sided

One-sided or two-sided binomial test, if control is not NA (default = "two.sided")

Details

For a detailed description of the bedGraph file format see http://genome.ucsc.edu/goldenPath/help/bedgraph.html.

Value

Returns a matrix containing peak locations, fold changes and their corresponding p-values sorted by chromosome. Has the following columns:

chromosome

Chromosome name

start

Start position of peak (1-based indexing)

end

End position of peak

ChIP.reads

Number of ChIP reads in the peak (normalized to per million mapped reads)

Control.reads

Number of control reads in the peak (normalized to per million mapped reads)

Fold.change

Fold change calculated as chip/control

p-value

P-value for the peak obtained from two-sided exact binomial test binom.test

Warning

For small window sizes for the padded bedGraph files and consequently large file sizes, reading the data may take a long time.

Author(s)

Apratim Mitra

See Also

binom.test, getPeakReads


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