Hello,
i have a list of geneId and i want to find the associated GO terms.
This list is quite long (> 1000) and I wish I could do this automatically with the R software for example.
Thank you for your help
Patricia
First you have to download the GAF file corresponding to your species from here
Then you can run this small script to get the GO terms you are looking for.
data<-read.delim(file="input/sgd.gaf",sep = "\t", as.is=TRUE, header=FALSE, comment.char="!")
data<-data[,c("V5","V9","V11")]
data[,"V11"]<-gsub("\\|.*","",data[,"V11"])
#Assuming you have the data one gene per line:
input<-read.table(file="input/genes.txt")
result<-data[data$V11 %in% input$V1,]
result<-subset(data,data$V11 %in% input)
Take a look at GeneSCF.
I use biomaRt for this.