I am trying to retrieve all genes that match a particular GO-ID using biomaRt:
ensembl <- useMart("ensembl", dataset = "mmusculus_gene_ensembl")
goGenes <- getBM(attributes = c("mgi_symbol", "go_id"),
filters = "go_id",
values = "GO:0098793",
mart = ensembl)
This returns a value of 53. However, if you look at the AmiGO page for this GO term and filter for M. musculus, you see that there are actually 779 genes (384 when you remove duplicated MGI symbols).
For this GO term, the page shows 591 genes after duplicates are removed. But running the function above with this GO term returns 0 genes.
What am I doing wrong here? Why don't the numbers match up?