I have a matrix of GO Term ID's and their GO term names. I'd like to order them by Term size, from largest to smallest number of genes.
So far I have been pulling all the genes from org.Mm.eg.db and counting the number of rows, but this is a slow process and difficult to (l)apply to many GO terms.
nrow(AnnotationDbi::select(org.Mm.eg.db, keytype="GOALL", keys=c("GO:0072089"), columns="SYMBOL"))
Is there a simple way to get the GO size of a list of Mm.db GO Terms so I can arrange them by size?