Question: Converting Gene Ontology Names To Go Ids
3
gravatar for jeffk8900
7.3 years ago by
jeffk890040
jeffk890040 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.

Jeff

gene ontology • 12k views
ADD COMMENTlink written 7.3 years ago by jeffk890040
12
gravatar for seidel
7.3 years ago by
seidel6.8k
United States
seidel6.8k wrote:

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 COMMENTlink written 7.3 years ago by seidel6.8k

This still works in March 2019!

ADD REPLYlink written 7 months ago by grant.hovhannisyan1.8k
5
gravatar for Damian Kao
7.3 years ago by
Damian Kao15k
USA
Damian Kao15k wrote:

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 COMMENTlink modified 7.3 years ago • written 7.3 years ago by Damian Kao15k
0
gravatar for Alex Paciorkowski
7.3 years ago by
Rochester, NY USA
Alex Paciorkowski3.3k 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 7.3 years ago by Alex Paciorkowski3.3k
Please log in to add an answer.

Help
Access

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