สร้าง boxplot ด้วยออบเจกต์ ExpressionSet
เมื่อรวมข้อมูลการทดลองทั้งหมดไว้ในออบเจกต์ ExpressionSet เดียวแล้ว การเลือกกลุ่มย่อยของ feature และ sample จะทำได้สะดวกยิ่งขึ้น ในแบบฝึกหัดนี้ จะสร้าง boxplot เพื่อแสดงผลยีนหนึ่งตัวอีกครั้ง แต่คราวนี้จะเลือก sample ที่ต้องการแสดงในกราฟด้วย
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
การวิเคราะห์ Differential Expression ด้วย limma ใน R
คำแนะนำการฝึกหัด
โหลด ExpressionSet eset ไว้ใน workspace ของคุณแล้ว
เลือกกลุ่มย่อยของ
esetให้เหลือเฉพาะ 10 sample แรก (คอลัมน์)สร้าง boxplot ของยีนที่ 1000 (แถวที่ 1000) ใน
eset_subโดยใช้ accessor functionsexprs,pDataและfData
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Subset to only include the first 10 samples (columns)
eset_sub <- eset[___]
# Check the dimensions of the subset
dim(eset_sub)
# Create a boxplot of the 1000th gene in eset_sub
boxplot(___(eset_sub)[___, ] ~ ___(eset_sub)[, "Disease"],
main = ___(eset_sub)[___, "symbol"])