Hierarchical heatmap แบ่งตาม condition
ในการประเมินคุณภาพของข้อมูล count เราจำเป็นต้องแปลงค่า normalized counts เพื่อให้แสดงภาพความแปรปรวนได้ดีขึ้นสำหรับการวิเคราะห์ unsupervised clustering หากต้องการประเมินความคล้ายคลึงของตัวอย่าง smoc2 ด้วย hierarchical heatmap ให้แปลงค่า normalized counts แล้วทำการวิเคราะห์ hierarchical clustering โดยสมมติว่าโหลดไลบรารีทั้งหมดแล้ว สร้าง DESeq2 object แล้ว และเก็บ size factors ไว้ใน DESeq2 object ชื่อ dds_smoc2 เรียบร้อยแล้ว
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
RNA-Seq ด้วย Bioconductor ใน R
คำแนะนำการฝึกหัด
- แปลง normalized counts จาก object
dds_smoc2โดยใช้ฟังก์ชันvst()พร้อม argumentblindแล้วบันทึกผลลัพธ์ไว้ในvsd_smoc2 - ดึงเมทริกซ์ของ transformed normalized counts จาก object
vsd_smoc2โดยใช้ฟังก์ชันassay()แล้วบันทึกเป็นvsd_mat_smoc2 - คำนวณค่าความสัมพันธ์ (correlation) ระหว่างตัวอย่าง แล้วบันทึกไว้ใน
vsd_cor_smoc2 - สร้าง heatmap ของค่า correlation โดยใช้
pheatmap()พร้อมแถบ annotation ที่แสดงconditionจาก data framesmoc2_metadata
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Transform the normalized counts
vsd_smoc2 <- ___(___, ___)
# Extract the matrix of transformed counts
vsd_mat_smoc2 <- ___(___)
# Compute the correlation values between samples
vsd_cor_smoc2 <- ___(___)
# Plot the heatmap
___(___, annotation = select(___, ___))