Peak calls
Reads are scattered all across the genome, but locations bound by the protein of interest will attract many overlapping reads, leading to peaks in coverage. These peaks are typically recorded with their genomic coordinates as well as a score that indicates the strength of the signal observed for this peak.
A set of peak calls has been loaded into R for you. The peak calls are stored in a GenomicRanges
object called peaks
. In addition to the usual functions to access the content of GenomicRanges
objects, two convenience functions are available for peak calls. You can use the chrom
function to obtain the chromosome a peak is located on and the score
function to obtain its score.
This exercise is part of the course
ChIP-seq with Bioconductor in R
Exercise instructions
- Print a summary of
peaks
. - Use the
score()
function to find the index of the highest scoring peak. - Extract the genomic coordinates of the highest scoring peak using the
chrom()
andranges()
functions.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Print a summary of the 'peaks' object
print(___)
# Use the score function to find the index of the highest scoring peak
max_idx <- which.max(___(peaks))
# Extract the genomic coordinates of the highest scoring peak using the `chrom` and `ranges` functions
max_peak_chrom <- ___(peaks)[___]
max_peak_range <- ___