limmaパッケージ

R での limma を用いた Differential Expression 解析

John Blischak

Instructor

limmaパッケージの利点

  • 数千の遺伝子を検定するには多くの定型コードが必要
pval <- numeric(length = nrow(x))
r2 <- numeric(length = nrow(x))
for (i in 1:nrow(x)) {
  mod <- lm(x[i, ] ~ p[, "er"])
  result <- summary(mod)
  pval[i] <- result$coefficients[2, 4]
  r2[i] <- result$r.squared
}
  • 遺伝子間で情報を共有することで推定精度を向上

  • 前処理・後処理のための豊富な関数群(概要はRitchie et al., 2015を参照)

biocManager::install("limma")
R での limma を用いた Differential Expression 解析

線形モデルの指定

$$ Y = \beta_0 + \beta_1 X_1 + \epsilon $$

  • $Y$ - 遺伝子の発現量
  • $B_0$ - ER陰性における平均発現量
  • $B_1$ - ER陽性における平均発現量の差
  • $X_1$ - ERステータス:0 = 陰性、1 = 陽性
  • $\epsilon$ - ランダムノイズ
R での limma を用いた Differential Expression 解析

Rで線形モデルを指定する

model.matrix(~<explanatory>, data = <data frame>)
design <- model.matrix(~er, data = pData(eset))
head(design, 2)
      (Intercept) erpositive
VDX_3           1          0
VDX_5           1          1
colSums(design)
(Intercept)  erpositive 
        344         209
table(pData(eset)[, "er"])
negative positive 
     135      209
R での limma を用いた Differential Expression 解析

limmaによる検定

library(limma)
# Fit the model
fit <- lmFit(eset, design)
# Calculate the t-statistics
fit <- eBayes(fit)
# Summarize results
results <- decideTests(fit[, "er"])
summary(results)
   erpositive
-1       6276
0       11003
1        5004
R での limma を用いた Differential Expression 解析

練習しましょう!

R での limma を用いた Differential Expression 解析

Preparing Video For Download...