p 值的直方圖
在完成檢定後,請透過檢視各個對比的 p 值分布,確認模型是否正確設定。回想一下:若某個對比只有少數差異表現基因,p 值應接近均勻分布;若有許多差異表現基因,p 值分布則會向右偏。
本練習屬於課程
使用 R 中的 limma 進行差異表達分析
練習說明
擬合後的模型物件 fit2 已載入到你的工作空間。limma 套件也已載入。
使用
topTable取得對比"dox_wt"中每個基因的摘要統計。將要回傳的基因數設為fit2的列數。對
"dox_top2b"與"interaction"兩個對比重複上述步驟。使用
hist為這三個對比各自繪製 p 值的直方圖。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Obtain the summary statistics for the contrast dox_wt
stats_dox_wt <- ___(fit2, coef = ___, number = ___,
sort.by = "none")
# Obtain the summary statistics for the contrast dox_top2b
stats_dox_top2b <- ___(fit2, coef = ___, number = ___,
sort.by = "none")
# Obtain the summary statistics for the contrast interaction
stats_interaction <- ___(fit2, coef = ___, number = ___,
sort.by = "none")
# Create histograms of the p-values for each contrast
___(stats_dox_wt[___])
___(stats_dox_top2b[___])
___(stats_interaction[___])