Hi Denise, thanks for that.
I've modified the code to say the following but it gives me exactly the same error:
library(biomaRt)
mart <- useMart(biomart = 'ensembl', dataset = 'mmusculus_gene_ensembl')
bm.query <- getBM(values=rownames(counts),attributes=c("mgi_symbol", "external_gene_name"),filters=c("ensembl_gene_id"),mart=mart)
genes <- list(ids=rownames(counts),names=bm.query[match(rownames(counts), bm.query$ensembl_gene_id),]$external_gene_id)
Would you be able to clarify what you meant and how that would be written?
I use the Biomart web interface quite often but only to input gene lists for it to convert, the aim of this is to switch it around in the count table so I can avoid having to do that, and for the plots generated in R to have the official gene symbol listed rather than the ensambl ID which essentially isn't that informative or helpful when looking at the plot.