"get.go.root" <- function(ont) { if(ont == "BP") return("GO:0008150") else if(ont == "MF") return("GO:0003674") else if(ont == "CC") return("GO:0005575") else stop("Invalid ontology (must be one of 'BP','MF', or 'CC')") }