Question: Converting Gene Ontology Names To Go Ids
gravatar for jeffk8900
8.1 years ago by
jeffk890050 wrote:

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.


gene ontology • 14k views
ADD COMMENTlink written 8.1 years ago by jeffk890050
gravatar for seidel
8.1 years ago by
United States
seidel7.1k wrote:

If you know R you can easily access terms and associated IDs as follows:

# load the GO library

# 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 COMMENTlink written 8.1 years ago by seidel7.1k

This still works in March 2019!

ADD REPLYlink written 18 months ago by grant.hovhannisyan2.0k
gravatar for Damian Kao
8.1 years ago by
Damian Kao15k
Damian Kao15k wrote:

Here is a flatfile from gene ontology that lists the GO ids and the description string:

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 COMMENTlink modified 8.1 years ago • written 8.1 years ago by Damian Kao15k
gravatar for Alex Paciorkowski
8.1 years ago by
Rochester, NY USA
Alex Paciorkowski3.4k wrote:

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 COMMENTlink written 8.1 years ago by Alex Paciorkowski3.4k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1756 users visited in the last hour