Given some GO BP terms for a gene I wish to find out, which of the terms has more specific meaning. I wish to find out the length of the shortest path between the BP Root term(GO:0008150) and the given term. Is there any suitable way to do that using any R package? Like something equivalent to my $length = $node->lengthOfShortestPathToRoot; in Perl's "GO-TermFinder" package.
Thanks in advance