Example
- The ‘BamBigwig_to_chipProfile’ function uses the soGGi package from Bioconductor
- It requires paths to one or multiple signal files (either bigwig or bam file) and bed files
- This can take a while with lots of ranges (how long?) so we will load a pre-complied object
Assign path to bed file to a variable
testRanges <- "K27ac_top10_HUES64.bed"
Read in the paths to the signal files (either bigwig or BAM files)
- To get bigwig files, go here
- Scroll/search for samples E016 (stem cells) and E013 (mesoderm) and download H3K27ac, H3K4me1, and H3K4me3 for each sample
- if this becomes a talk, need to probably shrink these and put into data people can access
library(profileplyr)
library(grid)
esc_files <- list.files("HUES64_E016/", full.names = TRUE)
meso_files <- list.files("meso_HUES64_E013/", full.names = TRUE)
esc_bigwigs <- esc_files[grepl("bigwig", esc_files)]
meso_bigwigs <- meso_files[grepl("bigwig", meso_files)]
signalFiles <- c(esc_bigwigs, meso_bigwigs)
Quantify bigwig signal over peaks in bed file
- Quantify the signal with ‘BamBigwig_to_chipProfile’ function (makes a chipProfile object from soGGi package)
- Convert chipProfile object to profileplyr object
# chunk not evaluated
chipProfile <- BamBigwig_to_chipProfile(signalFiles = signalFiles,
testRanges = testRanges,
format = "bigwig",
style = "percentOfRegion",
nOfWindows = 50,
distanceAround = 100)
# Convert this output to profileplyr object
proplyr_object <- as_profileplyr(chipProfile)