This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Using Plant GO Slim in topGO

Hi I am using topGO for GO enrichment analysis, I extracted the GO terms using biomart package and it worked perfectly. Now I wanted to do the GO analysis using Plant GO slim to get a broad overview of the ontology content without the detail of the specific fine grained terms.Is there any way to extract Plant GO Slim data and use that to create the geneID2GO object. I am attaching the code below. Thanks

library("biomaRt")
mart <- biomaRt::useMart(biomart = "plants_mart",`dataset = "athaliana_eg_gene",
                     host = 'plants.ensembl.org')
#Get ensembl gene ids and GO terms
GTOGO <- biomaRt::getBM(attributes = c( "ensembl_gene_id",
                                 "go_id"), mart = mart)
head (GTOGO)
#Remove blank entries
GTOGO <- GTOGO[GTOGO$go_id != '',]
# convert from table format to list format
geneID2GO <- by(GTOGO$go_id,
            GTOGO$ensembl_gene_id,
            function(x) as.character(x))
#examine result


head (geneID2GO)
topgo gene ontology plant go slim arabidopsis

I have found some old script from Thomas Girke link. It looks like it is what you are looking for. For example, in the variable slimv the slim GO terms are listed.

HTH

0 answers

No answers yet.

Log in to answer this question.