This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in fit2 commands

Hi everyone I was working on R and want to retrieve differentially expressed genes but got an error in the fit2 commands. I'l be very thankful if anyone can help me in removing it.

study3 = "GSE22309" 
gse22309dat = getGEO('GSE22309') 
gse22309raw= getGEOSuppFiles(study3)  

tarfile <- grep("\\.tar$", rownames(gse22309raw), value = TRUE) 
untar(tarfile, exdir="study3") 
celFiles <- unlist(list.files("study3", pattern = "\\.CEL.gz", full.names = TRUE)) 
gse22309preset = ReadAffy(filenames = celFiles) 
rmaData = rma(gse22309preset) 
gse22309eset= exprs(rmaData)  

groups = paste(pData(phenoData(gse22309dat[[1]]))$characteristics_ch1.1,pData(phenoData(gse2230 9dat[[1]]))$characteristics_ch1.2, sep=".") 
groups=as.character(groups) 
groups[groups=="status: insulin sensitive.agent: untreated"]= "IS.U" 
groups[groups=="status: insulin resistant.agent: untreated"]= "IR.U" 
groups[groups=="status: diabetic.agent: untreated"]= "T2D.U" 
groups[groups=="status: insulin sensitive.agent: insulin"]= "IS.T" 
groups[groups=="status: insulin resistant.agent: insulin"]= "IR.T" 
groups[groups=="status: diabetic.agent: insulin"]= "T2D.T" 
f = factor(groups, levels=c("IS.U","IR.U","T2D.U","IS.T","IR.T","T2D.T"))
design_gse22309 = model.matrix(~0+f) 
colnames(design_gse22309) = levels(f) 
cont.matrix = makeContrasts(T2D.U-IS.U, levels=design_gse22309)  

fit = lmFit(gse22309eset, design_gse22309) 
fit2 = contrasts.fit(fit, cont.matrix) 
fit2 = eBayes(fit2)  

fit2$genes$Symbol = getSYMBOL(fit2$genes$ID, "hgu95a") 

Error in lookUp (x, data, "SYMBOL") : No keys provided

Everything was okay then why this error appears?It'll be very helpful for me if anyone can pinpoint the error.

r annotate affy limma bioconductor

1 answer

Have you check, " fit2$genes$ID " in fit2$ object, seems its missing.

I think it is present in following commands

fit2 = contrasts.fit(fit, cont.matrix) 
fit2 = eBayes(fit2)

please don't guess, just check "fit2$genes$ID". And there is a space in "....pData(phenoData(gse2230 9dat[[1]..."

Again and again you repeated same errors in your every post, so first re-visit your own post.

Log in to answer this question.