Associating peaks with genes
You are almost ready to explore the relationship between peaks, genes, and their function in more detail. But first, let's take a closer look at how peak locations relate to genes. The chipenrich package provides useful plotting functions for this purpose. The peaks
object contains the coordinates of the peaks you used before. The plot_dist_to_tss()
function can create a plot of the distribution of distances between peak locations and the transcription start site (TSS) of genes.
The plot_chipenrich_spline()
function allows you to assess the frequency of peaks relative to the length of genes. In addition to the observed frequencies, it also plots the expected distribution for Fisher's exact test, a binomial model, and the model used by the chipenrich()
function.
This exercise is part of the course
ChIP-seq with Bioconductor in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Plot distribution of distances between peaks and transcription start sites
___(___, genome = "hg19")