Which peaks are different?
Let's take a look at how different the samples are in terms of peak calls. Looking at the merged peaks you've worked with before, how many peaks are shared between different samples?
One plot that can answer this question is a Venn diagram. They can be created directly from the DBA object using the dba.plotVenn()
function. An alternative is to use an UpSet plot, which you can create with the UpSetR package. This replaces the ellipses of a Venn diagram with a series of bar plots, indicating the size of various subsets. The upset()
function requires you to provide a data frame with one column for each set, i.e. sample, indicating set membership for each peak. The required data is contained in the called
field of the ar_diff
object.
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.
# Create Venn diagram
___(ar_diff, mask=1:4)