hey!
i am trying to annotate a dataset. i got gene symbols and want to provide GO terms.
the following is rather slow, i am sure there is a better way :-)
library("AnnotationDbi")
library("GO.db")
library("plyr")
library("org.Mm.eg.db")
genes <- c("Kit","Gata1","Cnga4","E130309D14Rik","Apol7c","Neil2","Atp7b","H2-Bl","Gli1","Glt6d1","Grem2","Fstl3","Il10rb","Ccdc71","Rho","Nt5dc1","Obox5","4931428F04Rik","Rbbp6","4922502N22Rik","Gbf1","Plp1","Gm7030","Slc6a20b","Bpifb6")
getgoterms <- function(x) {
x<-na.omit(x)
if( length(x) > 0){
terms<-toString(eapply(GOTERM[x], Term))
} else{return("NA")}
}
goterms <- mapIds(org.Mm.eg.db,
keys=genes,
column="GO",
keytype="SYMBOL",
multiVals=getgoterms)
goterms
thanks a lot!
sisterdot
