# NOT RUN {
data(chr11ChIPseq)
library(ggplot2)
ann.colors <-
c(noPeaks="#f6f4bf",
peakStart="#ffafaf",
peakEnd="#ff4c4c",
peaks="#a445ee")
if(interactive() && require(ggplot2)){
ggplot()+
scale_fill_manual("annotation", values=ann.colors,
breaks=names(ann.colors))+
penaltyLearning::geom_tallrect(aes(xmin=chromStart/1e3, xmax=chromEnd/1e3,
fill=annotation),
data=chr11ChIPseq$regions, alpha=1/2)+
theme_bw()+
theme(panel.margin=grid::unit(0, "cm"))+
facet_grid(sample.id ~ ., scales="free")+
geom_step(aes(chromStart/1e3, count), data=chr11ChIPseq$coverage)+
xlab("position on chr11 (kilo base pairs)")
}
# }
Run the code above in your browser using DataLab