Let be the number of genes in the query set ; let be the total number of genes having attribute ; let be the number of genes in having attribute ; and let be the total number of genes in the gene universe. Now, let the null hypothesis be that having attribute is independent of being in the set of genes , and let be the expected number of genes in having attribute under .
For each GO attribute , FuncAssociate computes the -values
and using a one-tailed Fisher's Exact Test:
To estimate , FuncAssociate first runs 1000 simulated queries in which the query gene sets of genes are chosen randomly from the same gene space as used in the original query. (Hence, holds for these simulated queries, by design.) When FuncAssociate searches for over-represented attributes, for each simulated query ( ) and each GO attribute , it computes -value using (1). Then, for each it determines , where is the set of all GO attributes. Then for each GO attribute , it estimates as the fraction of these that are less than or equal to (the -value computed using (1) for the user's original query set). We use the analogous procedure when the user is interested in under-represented attributes. When the user is interested in both over- and under-represented attributes, for each simulated query and each GO attribute , FuncAssociate computes -value using (1). Then, for each it determines . Then for each GO attribute , it estimates as the fraction of these that are less than or equal to .
Excluded from FuncAssociate's analysis are the GO attributes "obsolete'' from each branch of the ontology (GO ids 0008369, 0008370, and 0008371), the attributes "biological_process unknown'' (0000004), "molecular_function unknown'' (0005554), and "cellular_component unknown'' (0008372), as well as any descendants of these six attributes. Also the excluded from these analysis are the GO attributes "Gene_Ontology'' (0003673), "molecular_function'' (0003674), "cellular_component'' (0005575), and "biological_process'' (0008150).
To show that the null hypotheses in FuncAssociate's analysis are not independent, we can perform the following test. The number of GO attribute pairs in which both member attributes are associated with exactly the same S. cerevisiae genes, is 1,488 (out of a possible 5 million), and on average, these matches are over 6 genes. We can estimate what these numbers would be if the null hypotheses were independent by performing the same analysis many times on data sets obtained by assigning genes to attributes at random, subject only to the constraint that each attribute has as many genes associated with it in the simulated data as in the real data. We did this 10,000 times and analyzed the results. The maximum number of attribute pairs in one single simulation run whose members were associated with exactly the same genes was 108; the average was 67 pairs. Moreover these matches were, on average, over little more than 1 gene.