BinQuasi (version 0.1-6)

call.peaks: Call peaks from a list of window-level p-values

Description

Call peaks from a list of p-values corresponding to window-level tests on a genomic partition of ChIP-seq counts. Used within the main peak calling function, BQ.

Usage

call.peaks(window.pvals, method = c("BY", "BH", "none"), start, end,
  chromosomes, alpha = 0.05)

Arguments

window.pvals

Vector of p-values, with each element corresponding to a window of a genomic partition. Typically obtained from the QL.fit and QL.results functions.

method

Correction method applied to window.pvals. Must be one of "BH", "BY", or "none" to specify Benjamini-Hochberg, Benjamini-Yekutieli, or no adjustment, respectively.

start

Vector of the genomic start locations corresponding to the supplied p-values.

end

Vector of the genomic end locations corresponding to the supplied p-values.

chromosomes

Vector of the chromosome names corresponding to the supplied p-values.

alpha

The desired significance threshold in (0, 0.5).

Value

The called peaks as a dataframe with variables:

start

Genomic start locations of the called peaks.

end

Genomic end locations of the called peaks.

width

Width of the called peaks.

chr

Chromosomes of the called peaks.

P.val

p-values of the called peaks (aggregated from the windows comprising the peak using Simes' procedure).

Q.val

q-values of the called peaks (computing using the Benjamini-Hochberg procedure).

Details

After correcting for multiple testing using the adjustment specified by method, windows that are significant according to the threshold alpha are merged if adjacent and retained as candidate regions. Simes' procedure is used to combine the window-level p-values in each candidate region into a region-level p-value. The Benjamini-Hochberg procedure is applied to the resulting candidate regions and those that exceed the significance threshold alpha are returned as peaks.

References

Benjamini and Hochberg (1995) "Controlling the false discovery rate: a practical and powerful approach to multiple testing" Journal of the Royal Statistical Society Series B, 57: 289-300.

Benjamini and Yekutieli (2001) "The control of the false discovery rate in multiple testing under dependency" Annals of Statistics. 29: 1165-1188.

Simes (1986) "An improved Bonferroni procedure for multiple tests of significance" Biometrika, 73(3): 751-754.

Examples

Run this code
# NOT RUN {
# Example for a single chromosome.
start <- seq(1, 1e6, by = 200)
end <- start + 200 - 1
chromosomes <- rep('chr1', length(start))
p <- c(runif(length(start) - 10), rep(1e-12, 10))
called <- call.peaks(p, "BH", start, end, chromosomes)
called

# }

Run the code above in your browser using DataCamp Workspace