Naive question. I have an object "cd" that has ensembl ids as row names. I use the following to construct a dataframe with 2 columns.
go <- getBM(attributes = c("ensembl_gene_id", "go_id"), filters = "ensembl_gene_id", values = rownames(cd), mart = ensembl)
and that works fine, then what I want to do is use the Go.db library to add a column to that object with the Go-term, so I do the following:
go$term <- Term(go$go_id)
This adds the column but all of the values are "NA".
Any clues what I'm doing wrong or if its further upstream? Thanks