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
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"