## (all) terms
(gotrms <- terms("go", pagesize = 10000))
## or, using on ontology object
go <- Ontology("go")
gotrms <- terms(go, pagesize = 10000)
## (one) term
(trm <- gotrms[[1]])
termPrefix(trm)
gotrms[1:3]
gotrms[["GO:0032801"]]
## using an Ontology object
go <- Ontology("GO")
term(go, "GO:0032801")
## using an ontology prefix
term("GO", "GO:0032801")
isObsolete(gotrms[["GO:0030533"]])
isObsolete(gotrms[["GO:0005563"]])
isRoot(gotrms[["GO:0030533"]])
i <- isRoot(gotrms) & !isObsolete(gotrms)
gotrms[i]
for (ii in which(i))
show(gotrms[[ii]])
## or, directly querying the ontology
olsRoot(go)
parents(trm)
ancestors(trm)
children(trm)
descendants(trm)
partOf(gotrms[["GO:0008308"]])
partOf(term("BTO", "BTO:0000142"))
derivesFrom(term("BTO", "BTO:0002600"))
derivesFrom(term("BTO", "BTO:0001023"))
Run the code above in your browser using DataLab