GO terms depth level
2
3
Entering edit mode
10.1 years ago
ncl.lazzarini ▴ 130

Is there any tool that allows me to get, given a particular GO term (i.e. GO:0007049) it's level in the Gene Ontology tree? I tried to use http://amigo.geneontology.org/amigo/landing but the only way to get this information is to manually check either the graph view or the inferred tree. Is there anything I can use to easily retrieve this information?

SOLUTION:

I created a "manual" solution using python and querying http://supfam.cs.bris.ac.uk/SUPERFAMILY/index.html . It can be easily encoded in your scripts. It queries the website and it parses the html in order to find the "highest" parent. The it uses its "value" to calculate the level.

I hope it helps!

import urllib2
go_id = "GO:0009987"
response = urllib2.urlopen("http://supfam.cs.bris.ac.uk/SUPERFAMILY/cgi-bin/go.cgi?search=GO%3A"+go_id.split(":")[1])

for line in response.readlines():
    if line.startswith("<tr><td align=right><font color=#FF0000>"):
        value = int(line.split(":")[0].split()[-1])
        break
level = value + 1
ontology GO gene depth • 6.9k views
ADD COMMENT
0
Entering edit mode

Thank you for the help. Does not work for all GO terms!

There is a new link: https://supfam.org/SUPERFAMILY/cgi-bin/go.cgi?search=GO%3A0009987 where 0009987 is from "GO:0009987"

ADD REPLY
1
Entering edit mode
10.1 years ago

see GO+mysql http://wiki.geneontology.org/index.php/Example_Queries#Find_ancestors_of_the_node_.27nucleus.27

Find maximum tree depth for cellular component

SELECT distance as max from graph_path, term WHERE graph_path.term2_id =
term.id and term.term_type = 'cellular_component' ORDER BY distance desc
limit 1;
ADD COMMENT
0
Entering edit mode
10.1 years ago

That depends on how you define "tool". You can use a network analysis library, e.g. NetworX[1] to compute the shortest path between two nodes (in this case, between GO:0007049 and either the MF/BP/CC node). Be careful, though. GO is a Directed Acyclic Graph, so any node may have multiple parents, and thus it could have multiple "levels" (in theory, at least, I'm not sure if this is taken into consideration when they made the ontology).

[1] Yes, yes, I know it's not the most optimised or fastest, but it's rather user friendly.

ADD COMMENT

Login before adding your answer.

Traffic: 1860 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