#結果不行,需要數行數?
ncol(exprSet)
exprSet=exprSet[,-25]
## 創建分組
group
## 分組變成向量,並且限定leves的順序
## levels裡面,把對照組放在前面
group
## 構建比較矩陣
design
## 比較矩陣命名
colnames(design)
design
#2.線性模型擬合
fit
#3.貝葉斯檢驗
fit2
#4.輸出差異分析結果,其中coef的數目不能超過design的列數
# 此處的2代表的是第二列和第一列的比較
allDiff=topTable(fit2,adjust='fdr',coef=2,number=Inf)
save(allDiff,file = "allDiff.Rda")
<code>## 分組
group ## 因子化
group ## 分組矩陣
design ## 分組矩陣命名
colnames(design) design
## 比較矩陣,其中treat - con根據自己的組別更改
contrast.matrix contrast.matrix
## 線性擬合
fit fit2 ## 貝葉斯檢驗
fit2 ## 提取差異結果,注意這裡的coef是1
allDiff=topTable(fit2,adjust='fdr',coef=1,number=Inf) /<code>
多了幾個函數,makeContrasts ,一次三組同事比較
group group design colnames(design) design
contrast.matrix acute - chronic,
progression - chronic,
levels=design)
contrast.matrix
fit fit2 fit2
XIST
contrast.matrix
Contrasts
Levels acute - progression acute - chronic progression - chronic
acute 1 1 0
chronic 0 -1 -1
progression -1 0 1
閱讀更多 yourworld 的文章