limma对基因芯片数据基因差异表达分析

HAPPYNEWYEAR

limma

suppressPackageStartupMessages(library(CLL))

data(sCLLex)

exprSet=exprs(sCLLex)##sCLLex是依赖于CLL这个package的一个对象

samples=sampleNames(sCLLex)

pdata=pData(sCLLex)

group_list=as.character(pdata[,2])

dim(exprSet)

[1]

exprSet[1:5,1:5]

CLL11.CELCLL12.CELCLL13.CELCLL14.CELCLL15.CEL

_at5.....

_at2.....

_f_at3.....

_s_at1.....

_at7.....

par(cex=0.7)

n.sample=ncol(exprSet)

if(n.sample40)par(cex=0.5)

cols-rainbow(n.sample*1.2)

boxplot(exprSet,col=cols,main="expressionvalue",las=2)

suppressMessages(library(limma))

design-model.matrix(~0+factor(group_list))

colnames(design)=levels(factor(group_list))

rownames(design)=colnames(exprSet)

design

progres.stable

CLL11.CEL10

CLL12.CEL01

CLL13.CEL10

CLL14.CEL10

CLL15.CEL10

CLL16.CEL10

CLL17.CEL01

CLL18.CEL01

CLL19.CEL10

CLL20.CEL01

CLL21.CEL10

CLL22.CEL01

CLL23.CEL10

CLL24.CEL01

CLL2.CEL01

CLL3.CEL10

CLL4.CEL10

CLL5.CEL10

CLL6.CEL10

CLL7.CEL10

CLL8.CEL10

CLL9.CEL01

attr(,"assign")

[1]11

attr(,"contrasts")

attr(,"contrasts")$`factor(group_list)`

[1]"contr.treatment"

contrast.matrixmakeContrasts(paste0(unique(group_list),collapse="-"),levels=design)

contrast.matrix

Contrasts

Levelsprogres.-stable

progres.1

stable-1

fit-lmFit(exprSet,design)

fit2-contrasts.fit(fit,contrast.matrix)##这一步很重要,大家可以自行看看效果

fit2-eBayes(fit2)

tempOutput=topTable(fit2,coef=1,n=Inf)

nrDEG=na.omit(tempOutput)

head(nrDEG)

logFCAveExprtP.Valueadj.P.ValB

_at-1..-5..e-..

_at0....e-..

_at1....e-..

_at-1..-5..e-..

_at0....e-..

_at2....e-..

预览时标签不可点收录于话题#个上一篇下一篇


转载请注明:http://www.bjgongshangzhuce.com/jywh/9398.html


当前时间: