I am looking for a tool that will take a list of gene ontology names (such as: axon guidance) and convert them to GO ID (GO:0007411). The Gene Ontology site has that utility but isn't perfect and doesn't allow easy download.
Thanks in advance.
Jeff
I am looking for a tool that will take a list of gene ontology names (such as: axon guidance) and convert them to GO ID (GO:0007411). The Gene Ontology site has that utility but isn't perfect and doesn't allow easy download.
Thanks in advance.
Jeff
If you know R you can easily access terms and associated IDs as follows:
# load the GO library
library(GO.db)
# extract a named vector of all terms
goterms <- Term(GOTERM)
# work with it in R, or export it to a file
write.table(goterms, sep="\t", file="goterms.txt")
The result "goterms" is a named array of terms where the values are the terms and the names are the GO IDs. Thus you could work within R to match your terms of interest to the list and return the associated IDs, or you could write the result out to a file. The line above creates a file with two columns: id and term, with just over 31,000 lines (since it's a named array, R puts the names in a column). The GO library has a lot of functions for working with GO ids, and lots of mappings of various sorts (try ls("package:GO.db") to see what's available).
Here is a flatfile from gene ontology that lists the GO ids and the description string: http://www.geneontology.org/doc/GO.terms_alt_ids
You can write a script to parse that. Something like this: (in python)
index = dict([(line.strip().split('\t')[-2],line.strip().split('\t')[0]) for line in open('GO.terms_alt_ids','r') if line[0] != "!"])
GOID = index['your go term']
You can download the SQL dump from the Ontology Lookup Service and run queries against it. This can give you what you want. Take a look at their examples on their download page.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
This still works in March 2019!