Skip to main content
. 2010 Mar 30;2(2):238–244. doi: 10.4056/sigs.561626

Figure 2.

Figure 2

Pseudocode for determining ancestors or offspring in the GO. The “g” and “t” arguments to the TermSpecificity function are the GO structured as a DAG, and the particular term in question respectively. This routine is similar to a standard “depth-first-search” graph algorithm that searches for a specific node in a subgraph [8], however its purpose is to count the visited nodes rather than to locate a specific node. An “unvisited” neighbor is either a parent or child node, depending on whether offspring or ancestors are being counted. For the implementation of these methods see the “Implementation” section.