因子式實驗設計

使用 R 中的 limma 進行差異表達分析

John Blischak

Instructor

因子式設計

  • 2x2 設計:研究低溫對植物的影響:
    • 2 種 Arabidopsis thaliana:col、vte2
    • 2 種溫度:正常、低溫
    • Maeda 等,2010
dim(eset)
Features  Samples 
   11871       12
table(pData(eset)[, c("type", "temp")])
      temp
type   low normal
  col    3      3
  vte2   3      3
使用 R 中的 limma 進行差異表達分析

2x2 因子之群組平均模型

$$ Y = \beta_1 X_1 + \beta_2 X_2 + \beta_3 X_3 + \beta_4 X_4 + \epsilon $$

  • $\beta_1$-col 植株在 low 溫度下的平均表現量
  • $\beta_2$-col 植株在 normal 溫度下的平均表現量
  • $\beta_3$-vte2 植株在 low 溫度下的平均表現量
  • $\beta_4$-vte2 植株在 normal 溫度下的平均表現量
使用 R 中的 limma 進行差異表達分析

2x2 因子之群組平均設計矩陣

group <- with(pData(eset), 
              paste(type, temp, sep = "."))
group <- factor(group)
design <- model.matrix(~0 + group)
colnames(design) <- levels(group)
head(design, 3)
  col.low col.normal vte2.low vte2.normal
1       0          1        0           0
2       0          1        0           0
3       0          1        0           0
colSums(design)
    col.low  col.normal    vte2.low vte2.normal 
          3           3           3           3
使用 R 中的 limma 進行差異表達分析

2x2 因子對比

$\beta_1$ $\beta_2$ $\beta_3$ $\beta_4$
type col col vte2 vte2
temp low normal low normal
  • Differences of type in normal temp: $\beta_4 - \beta_2 = 0$
  • Differences of type in low temp: $\beta_3 - \beta_1 = 0$
  • Differences of temp in vte2 type: $\beta_3 - \beta_4 = 0$
  • Effect of temp in col type: $\beta_1 - \beta_2 = 0$
  • Differences of temp between col and vte2 type: $(\beta_3 - \beta_4) - (\beta_1 - \beta_2) = 0$
使用 R 中的 limma 進行差異表達分析

2x2 因子之對比矩陣

library(limma)
cm <- makeContrasts(type_normal = vte2.normal - col.normal,
                    type_low = vte2.low - col.low,
                    temp_vte2 = vte2.low - vte2.normal,
                    temp_col = col.low - col.normal,
                    interaction = (vte2.low - vte2.normal) -(col.low - col.normal),
                    levels = design)
cm
             Contrasts
Levels        type_normal type_low temp_vte2 temp_col interaction
  col.low               0       -1         0        1          -1
  col.normal           -1        0         0       -1           1
  vte2.low              0        1         1        0           1
  vte2.normal           1        0        -1        0          -1
使用 R 中的 limma 進行差異表達分析

檢定 2x2 因子設計

library(limma)

# 估計迴歸係數
fit <- lmFit(eset, design)

# 套用對比
fit2 <- contrasts.fit(fit, contrasts = cm)

# 計算 t 統計量
fit2 <- eBayes(fit2)

# 摘要結果
results <- decideTests(fit2)
summary(results)
   type_normal type_low temp_vte2 temp_col interaction
-1           0      466      1635     1885         128
0        11871    10915      7635     6989       11640
1            0      490      2601     2997         103
使用 R 中的 limma 進行差異表達分析

乾旱對 Populus 的影響

  • 2x2 設計:研究乾旱對樹木的影響:
    • 2 種 Populus:DN34、NM6
    • 2 種水分條件:正常、乾旱
    • Wilkins 等,2009
dim(eset)
Features  Samples 
   16172       12
table(pData(eset)[, c("type", "water")])
      water
type   drought normal
  dn34       3      3
  nm6        3      3
使用 R 中的 limma 進行差異表達分析

一起來練習吧!

使用 R 中的 limma 進行差異表達分析

Preparing Video For Download...