開始使用免費開始

移除黑名單區域

在進一步分析前,辨識並移除位於黑名單區域的 peaks 是很重要的一步。這個練習會使用 ChIPQC 套件內建的黑名單。你也可以直接從 ENCODE 取得。

在本練習中,peak calls 已經存在於 peaks,coverage 資料在 cover,黑名單區域在 blacklist.hg19。你會需要用到 findOverlaps() 函式。在 Bioconductor 入門課程中,你已經看過區域重疊的概念,我們也會在本章後面再回到這個主題。

載入本練習所需的所有資料與 R 套件可能需要一點時間,請耐心等候。

本練習屬於課程

在 R 中使用 Bioconductor 進行 ChIP-seq

檢視課程

練習說明

  • 找出 peaks 與黑名單區域之間的所有重疊。
  • 使用 Gviz 繪製讀取 coverage、peak calls,以及黑名單區域。
  • 移除所有位於黑名單的 peaks。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Find all overlaps between peaks and blacklisted regions
blacklisted <- ___(peaks, blacklist.hg19, type="within")

# Create a plot to display read coverage together with peak calls and blacklisted regions in the selected region
cover_track <- ___(cover, window=10500, type="polygon", name="Coverage",
                         fill.mountain=c("lighgrey", "lightgrey"), col.mountain="grey")

# Calculate peak_track and region_track, plot plotTracks
peak_track <- ___(peaks, name="Peaks", fill="orange")
region_track <- ___(region, name="Blacklist")
plotTracks(list(ideogram, cover_track, peak_track, region_track, GenomeAxisTrack()),
           chromosome="chr21", from=start(region)-1000, to=end(region)+1000)

# Remove all blacklisted peaks
clean_peaks <- ___[-from(blacklisted)]
編輯並執行程式碼