Converting Gene Ontology Names To Go Ids
3
9
Entering edit mode
12.4 years ago
jeffk8900 ▴ 70

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

gene ontology • 23k views
ADD COMMENT
22
Entering edit mode
12.4 years ago
seidel 11k

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).

ADD COMMENT
0
Entering edit mode

This still works in March 2019!

ADD REPLY
6
Entering edit mode
12.4 years ago

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']
ADD COMMENT
1
Entering edit mode
12.4 years ago

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.

ADD COMMENT

Login before adding your answer.

Traffic: 1757 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6