centrePeaks | R Documentation |
Use coverage to estimate peak centres
centrePeaks(x, y, ...)
## S4 method for signature 'GRanges,BamFileList'
centrePeaks(
x,
y,
f = c("weighted.cov", "mean", "median"),
BPPARAM = bpparam(),
...
)
## S4 method for signature 'GRanges,BamFile'
centrePeaks(x, y, ...)
## S4 method for signature 'GRanges,BigWigFileList'
centrePeaks(
x,
y,
f = c("weighted.cov", "mean", "median"),
BPPARAM = bpparam(),
...
)
## S4 method for signature 'GRanges,BigWigFile'
centrePeaks(x, y, ...)
## S4 method for signature 'GRanges,character'
centrePeaks(x, y, ...)
x |
A set of GRanges representing peaks |
y |
A suitable set of files with methods defined |
... |
Used to pass arguments between methods |
f |
The function to use when estimating a combined peak centre |
BPPARAM |
An object of class BPPARAM |
Use coverage to estimate the centre of a set of peaks or GenomicRanges.
If using the mean or median, the point of maximum coverage for each sample will be found within each peak and these positions will be averaged to return a position representing an estimated peak centre.
If using weighted.cov, positions are weighted by the combined coverage across all samples to return the weighted mean position. In this case coverage will be scaled by total alignments within each bam file before summing across files
A GRanges object with all widths set to one
## Define some peaks
f <- system.file("extdata/peaks.bed.gz", package = "extraChIPs")
peaks <- importPeaks(f, type = "bed")[[1]]
peaks
## Use a bam file to re-centre the regions using highest coverage
bf <- system.file("extdata/bam/ex1.bam", package = "extraChIPs")
centres <- centrePeaks(peaks, bf, BPPARAM = SerialParam())
centres
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.