As we had a bunch of data, we first combined all the functional enrichment results for all, east and west.
Here is the R code to get the top enrichments and top pvalues:
mf = read.csv("top1_mf.csv", header=T)
enrich_mf = mf$pobs / mf$pexp
pvalues_mf = log10(mf$pval)
x = mf
new = cbind(mf, enrich_mf, pvalues_mf)
plot(new$pvalues_mf, new$enrich_mf)
topenrich=new[which(new$enrich_mf > 2),]
write.table(topenrich, file = "all_mf_cutoff2enrich.txt", row.names=FALSE, col.names=TRUE, sep =" ", quote=FALSE)