Count the number of descendants of a term
count_descendants(x, term_id, predicate = "rdfs:subClassOf", ...)integer(1).
goref <- semsql_connect(ontology = "go")
#> Connected to SemanticSQL database: /home/runner/.cache/R/BiocFileCache/51aa7efd341e_go.db
#> Primary ontology prefix: GO
count_descendants(goref, "GO:0006915") # all apoptosis subtypes
#> [1] 72
disconnect(goref)
#> Disconnected from '51aa7efd341e_go.db'