峰值區域 vs 背景
現在要比較峰值區域、黑名單區域與背景的覆蓋度分佈。在這個練習中,你會檢視第 5 號染色體的資料。
此染色體中,峰值區域、黑名單區域與背景的分箱讀取計數,分別已提供為 peak_bins、bl_bins 與 bkg_bins。score 欄包含讀取計數。
載入此練習所需的所有資料與 R 套件可能需要一點時間。請耐心等候。
本練習屬於課程
在 R 中使用 Bioconductor 進行 ChIP-seq
練習說明
- 將讀取計數整理成資料框,作為繪圖用資料。
- 使用
rbind()合併這三個資料框。 - 依分箱類型製作讀取計數的盒狀圖。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Prepare read counts for plotting by organising them in data frames
peak_scores <- data.frame(source="peaks", fragments=___$score)
bl_scores <- data.frame(source="blacklist", fragments=___)
bkg_scores <- data.frame(source="background", fragments=___)
scores <- rbind(___, ___, ___)
# Create a boxplot of the read counts by bin type
ggplot(___, aes(y=fragments, x=source)) + geom_boxplot()