Hello,
I am attempting to perform a gene ontology enrichment analysis. I am applying the goana function to my MArrayLM object returned from the eBayes fit. When I use the following code, it returns an error:
eset<-rma(CELdat, background=TRUE, normalize=TRUE, subset=NULL, target="core")
library(affycoretools)
eset <- annotateEset(eset, annotation(eset))
library(org.Dr.eg.db)
fd <- fData(eset)
fd$ENTREZID <- mapIds(org.Dr.eg.db, as.character(fd$SYMBOL), "ENTREZID","SYMBOL",multiVals="first")
fData(eset) <- fd
library(limma)
design = model.matrix(~ 0 + f)
colnames(design)=c("control","morphant","rescue")
design
data.fit = lmFit(eset,design)
contrast.matrix = makeContrasts(morphant-control,rescue-control,morphant-rescue,levels=design)
data.fit.con = contrasts.fit(data.fit,contrast.matrix)
data.fit.eb = eBayes(data.fit.con)
go <- goana(data.fit.eb, coef=1,geneid=data.fit.eb$genes$ENTREZID,species="dre",convert=TRUE)
Error in goana.default(de = DEGenes, universe = universe, ...) :
org.dre.eg.db package required but not not installed (or can't be loaded)
I downloaded the packages (org.Dr.eg.db, pd.zebgene.1.1.st) for the microarray platform (Affy 1.1 ST Zebrafish Gene Array) but it seemingly cant be loaded. Can anyone help me with the GO enrichment here?
Thanks,
Matt
R version 3.3.1 (2016-06-21)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] edgeR_3.14.0 limma_3.28.21 org.Dr.eg.db_3.3.0
[4] AnnotationDbi_1.34.4 affycoretools_1.44.3 pd.zebgene.1.1.st_3.12.0
[7] RSQLite_1.0.0 DBI_0.5-1 oligo_1.36.1
[10] Biostrings_2.40.2 XVector_0.12.1 IRanges_2.6.1
[13] S4Vectors_0.10.3 Biobase_2.32.0 oligoClasses_1.34.0
[16] BiocGenerics_0.18.0
Thank you Gordon, this worked perfectly and the information is very helpful!
I may be wrong but geneid="ENTREZID" unfortunately does not work with the pd.zebgene.1.1.st annotation package. I am not aware of a zebgene11sttranscriptcluster.db comparable to ~ hugene11sttranscriptcluster.db so that was the only way I could find to obtain Entrez ID's.
The goana() function does not make any use of pd.zebgene.1.1.st. As I say, you can just use geneid="ENTREZID" in the goana() call. A correct call would be:
you were correct, thanks again!