This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Convert Refseq Accession To Gene Symbol Using Biomart

I used to convert RefSeq accessions to gene symbols in R using biomaRt like this:

library(biomaRt)
mart<- useDataset("hsapiens_gene_ensembl", useMart("ensembl"))
refseq <- c("NM_006945", "NM_152486", "NM_198317")
getBM(filters="refseq_dna", attributes="external_gene_id", values=refseq, mart=mart)

This used to work, but now I get this error:

Invalid filters(s): refseq_dna
Please use the function 'listFilters' to get valid filter names*

I found the filter name "refseq_mrna" which produces this error:

Query ERROR: caught BioMart::Exception::Database: Error during query execution: Table 'ensemblmart64.oxRefSeqmRNA__dm' doesn't exist

What is the correct way to convert RefSeq accessions to gene symbols with biomaRt?

Thanks!

r biomart refseq conversion

2 answers

You can find the desired filters that way:

> listFilters(mart)[grep("Refseq",as.character(listFilters(mart)$description)),]
                        name                                        description
139              refseq_mrna              Refseq mRNA ID(s) [e.g. NM_001195597]
140             refseq_ncrna                Refseq ncRNA ID(s) [e.g. NR_003682]
141    refseq_mrna_predicted    Refseq Predicted mRNA ID(s) [e.g. XM_001125684]
142   refseq_ncrna_predicted      Refseq Predicted ncRNA ID(s) [e.g. XR_108264]
143           refseq_peptide           Refseq protein ID(s) [e.g. NP_001028687]
144 refseq_peptide_predicted Refseq predicted protein ID(s) [e.g. XP_001719550]
145           refseq_genomic              Refseq Genomic ID(s) [e.g. NG_001333]

However, most yield a missing table error, exept refseq_genomic. www.biomart.org/martview as well as the Ensembl-biomart website (using the uswest mirror, due to the main site being down until Monday, 24.) yield the same error with this query. So there seems to be some problem with biomart. You should report this to users@biomart.org.

The error:

Query ERROR: caught BioMart::Exception::Database: Error during query execution: Table 'ensembl_mart_64.ox_RefSeq_mRNA__dm' doesn't exist

is a known bug in the current release of Ensembl. It should be fixed in version 65. See the bug page for a possible workaround.

Log in to answer this question.