熱圖
在進入下一章更詳細的 ChIP-seq 工作流程之前,你可以先 預覽部分分析結果。
在這個練習中,你將學習如何用熱圖來視覺化樣本之間的差異。
資料已經載入,並整理成可用 heatmap() 函式繪圖的格式。
樣本的相關係數矩陣可由 sample_cor 取得,而每個 peak 的標準化讀取計數
則儲存在 read_counts 物件中。在這兩個物件中,前 2 個樣本來自原發性腫瘤,
最後 2 個樣本為治療抗性。
你可以在 heatmap() 的 ColSideColors 與 RowSideColors 參數傳入一個群組標籤對應的色彩向量,
以突顯哪些樣本屬於同一個群組。
本練習屬於課程
在 R 中使用 Bioconductor 進行 ChIP-seq
練習說明
- 建立一個可用於在圖中標示群組的色彩名稱向量。
- 將樣本相關係數矩陣
sample_cor以熱圖呈現。 - 為 peak 的讀取計數建立熱圖。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Create a vector of colors to label groups (there are 2 samples per group)
group <- c(primary = rep("blue", ___), TURP = rep("red", ___))
# Plot the sample correlation matrix `sample_cor` as a heat map
# Use the group colors to label the rows and columns of the heat map
heatmap(___, ColSideColors = ___, RowSideColors = ___,
cexCol = 0.75, cexRow = 0.75, symm = TRUE)
# Create a heat map of peak read counts
# Use the group colors to label the columns of the heat map
___(___, ColSideColors = ___, labRow = "", cexCol = 0.75)