Plotting a region in detail
It's your turn to plot a genomic region with Gviz. All data in this exercise are from chromosome 20 of a single sample. An ideogram of chromosome 20 has been created for you and is available as ideogram
. The mapped reads have already been converted to coverage data. This information is available as a GRanges
object called cover_ranges
. Peak calls in the region you will be plotting are stored in the peak_calls
object.
It may take a moment to load all required data and R packages for this exercise. Please be patient.
This exercise is part of the course
ChIP-seq with Bioconductor in R
Exercise instructions
- Create annotation tracks for peak calls.
- Create a data track for read coverage.
- Display the plot, showing from top to bottom, an ideogram, coverage track, track of peak calls, and an axis displaying the genomic position.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Create annotation track
peak_track <- AnnotationTrack(___, name="Peaks")
# Create data track
cover_track <- ___(cover_ranges, window=10500, type="polygon", name="Coverage",
fill.mountain=c("lighgrey", "lightgrey"), col.mountain="grey")
# Produce plot
___(list(ideogram, ___, ___, GenomeAxisTrack()), chromosome="chr20", from=start_pos, to=end_pos)