knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Using a BED6 file of processed ChiP-seq peaks and a BED9 file of methylation data in a format similar to those found at http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeHaibMethylRrbs/ (percent reads methylated must be column 9) with the header line manually removed, ChIPAnalyzer can determine the percentage of bases with data with the peaks that are methylated.
library(ChIPAnalyzer) system.file("extdata", "MAZ_high_score.bed", package = "ChIPAnalyzer") system.file("extdata", "HcfUMethylData.bed", package = "ChIPAnalyzer") overlap <- getMethylOverlap(chipPath = "MAZ_high_score.bed", methylPath = "HcfUMethylData.bed")
This will return a data frame in a from similar to the methylation BED file, with the 9th column, named "coverage" specifying the percentage of reads that were methylated at that site. A low percentage indicates little methylation. Now we will plot the average percentage of nucleotides accross all peaks that were methylated:
plotMethylPercentage(methylOverlapData = overlap)
This will result in a pie chart indicating the average frequency, as a percentage, that nucleotides within the ChIP-SEQ peaks were methylated.
Lawrence M, Huber W, Pag`es H, Aboyoun P, Carlson M, et al. (2013) Software for Computing and Annotating Genomic Ranges. PLoS Comput Biol 9(8): e1003118. doi:10.1371/journal.pcbi.1003118
UCSC Genome Browser Maintainers. (2011, September 22). Sequence and Annotation Downloads. Retrieved November 13, 2020, from http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeHaibMethylRrbs/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.