Hi, Is there any software (or online tool) that calculates the path length between two GO terms?
Hi, Is there any software (or online tool) that calculates the path length between two GO terms?
I don't know about a public tool (=easy way) at the moment, however, I think it is not that easy. There might be not ONE path, there might be multiple. Also, there might be circles, which makes it more difficult or impossible to answer this question - if you do not specify your question further.
Also, why are you interested in this, I would like to know.
There most definitely are circles in GO as in pretty much every other ontology. If you don't believe me, follow this link. That is why I said you most likely need to specify your question a bit more, for example if you say that you only want to follow 'is a' relationships, the situation might be different. Still you did not explain why you want this information, what do you think this shortest path would be good for?
Ok, I am only considering 'is-a' relationship and looking for the shortest path length between two GO terms before we go ahead and implement it. I need it to implement some similarity measures between GO terms (and so between genes). So it is needed to deduce semantic similarity between genes. --thanks
The Gene Ontology is a directed acyclic graph, provided you only consider is_a (parent/child) relations (see @LLTommy's comments). If so you can apply graph paths algorithm to it. It seems that what you're looking for is the Floyd-Warshall algorithm. You'll find an implementation in the perl Graph module. Alternatively, you can also use the distances() function in the R igraph package which implements several algorithms.
Edit: clarified when GO is a DAG as per @LLTommy's comments
Well, who is we? :D I can ensure you that a lot of people are interested in the other relationships as well .... and yes, like I said, your statement is true for parent/child but there is a lot more to these ontologies and that is what I point out because many people seem to miss this/over simplify it.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
I mean 'two GO terms' sorry...