Consolidating peaks
Before you explore how to annotate peak calls, it may be useful to take a look at how you can obtain a merged peak set that incorporates calls from all samples. The package ChIPpeakAnno provides the function findOverlapsOfPeaks()
for this purpose. It allows merging of peak sets, represented as GenomicRanges, from up to five samples.
Before you can use this function, you'll have to extract the information about peak calls from the ChIPQCexperiment object you created earlier. You can retrieve peak locations via the peaks()
function. Note that this will return peak calls for all samples. This includes those that didn't pass QC. A vector containing indices of the samples that we selected for further analysis during the QC step is available as qc_pass
.
This exercise is part of the course
ChIP-seq with Bioconductor in R
Exercise instructions
- Extract peaks from the ChIPQCexperiment object.
- Discard all samples that failed QC.
- Find overlaps between peak sets using the
findOverlapsOfPeaks()
function. - Examine the merged peak set available as the
mergedPeaks
entry.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Extract peaks from ChIPQCexperiment object
peak_calls <- ___(ar_calls)
# Only keep samples that passed QC
peak_passed <- ___[qc_pass]
# Find overlaps between peak sets
peaks_combined <- ___(peak_passed[[1]], peak_passed[[2]], peak_passed[[3]], peak_passed[[4]], maxgap=50)
# Examine merged peak set
print(___)