This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to get list of all GO terms in each ontology

Hi,

I want to get lists of all GO terms in each ontology for the a GO release. The GO consortium releases .obo file for the latest GO versions (http://geneontology.org/ontology/go-basic.obo) containing all the information. However, I would like to get a flat file which is easier to parse for applications in other scripts such as this file which the GO do not release anymore - http://www.geneontology.org/doc/GO.terms_alt_ids

Is there any R Bioconductor package which can help me generate the list or any other tool? Any suggestions are welcome. Thanks

gene-ontology r

Hi,

Thank you for the replies. That is helpful for the next steps in my analysis.

I found a solution for generating the GO term lists for each ontology using GOOSE to query the GO database from the AmiGo 2 webserver: http://amigo.geneontology.org/goose

using the following SQL query:

SELECT * FROM term WHERE term_type='cellular_component';

It generates results in a table which can also be downloaded in text format. Similarly lists can be generated for other ontologies.

One can view the results of the above query here:

http://amigo.geneontology.org/goose?query=SELECT+*+FROM+term+WHERE+term_type%3D%27cellular_component%27%3B&mirror=ebi&limit=0

1 answer

Use the GO.db package.

The term function:

library(GO.db)
Term("GO:0016021")

will return the corresponding ontology

Great package! Saved me a lot of hassle

Log in to answer this question.