error in getBM (biomaRt): "error: no such table: metadata"
3
0
Entering edit mode
JINYI • 0
@jinyi-23630
Last seen 4.3 years ago

Hi all- I'm currently trying to annotate Ensembl ID of my RNAseq output with gene names with biomaRt and I use the function getBM. However, it keeps giving me the error: "no such table: metadata". I guess it's not something wrong with my input since I have the same error even with the sample script provided in R documentation as shown below. mart <- useMart(biomart = "ensembl", dataset = "hsapiens_gene_ensembl") getBM(attributes = c("affy_hg_u95av2", "hgnc_symbol", "chromosome_name", "band"), filters = "affy_hg_u95av2", values = c("1939_at","1503_at","1454_at"), mart = mart)

error: no such table: metadata

session info

R version 4.0.0 (2020-04-24) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18362)

other attached packages: [1] biomaRt_2.44.0

biomaRt software error • 2.7k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 11 minutes ago
United States

You should use useEnsembl rather than useMart.

> library(biomaRt)
> mart <- useEnsembl("ensembl","hsapiens_gene_ensembl")
> getBM(attributes = c("affy_hg_u95av2", "hgnc_symbol", "chromosome_name", "band"), filters = "affy_hg_u95av2", values = c("1939_at","1503_at","1454_at"), mart = mart) 
  affy_hg_u95av2 hgnc_symbol chromosome_name   band
1        1503_at       BRCA2              13  q13.1
2        1939_at        TP53              17  p13.1
3        1454_at       SMAD3              15 q22.33
ADD COMMENT
0
Entering edit mode

Thanks for the suggestion! But it gives the same error again. I'm wondering whether it's mart that causes the error. Do you have any suggestions on checking whether that works?

ADD REPLY
1
Entering edit mode
@fb203eae
Last seen 3.4 years ago
India

I faced a similar issue. In my case, none of the biomaRt functions worked and all threw the same error. Error: no such table: metadata Solved it by deleting the hidden .cache folder in the working directory. There was a biomaRt folder inside that. So I believe deleting the biomaRt folder or the contents inside that would do the job.

ADD COMMENT
0
Entering edit mode

Thanks for providing this solution. Anyone else encountering the issue can test if the cache is a problem by running getBM() with the argument useCache = FALSE which will disable any attempts to use the biomaRt cache folder.

If it looks like the cache is the problem you can delete it from an R session with biomartCacheClear() although there should als be no problem with deleting the folder manually.

ADD REPLY
0
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 15 hours ago
EMBL Heidelberg

I don't think I've seen "error: no such table: metadata" before.

If your running biomaRt code that work and is now throwing an error, or the example in the vignette are also doing the same thing, then the most likely source is a temporary issue with the Ensembl server.

As James says, you should use useEnsembl() to create the Mart object. That function has the argument mirror, which lets you query one of the Ensembl mirrors. That's normally a good strategy if there's a server issue using the default options.

mart <- useEnsembl("ensembl","hsapiens_gene_ensembl",
                   mirror = "uswest")

Valid options for the mirror are www, uswest, useast, asia

ADD COMMENT
0
Entering edit mode

Thank you, Mike! It's really good to know that mirror might help with the source issue. Unfortunately, I guess it's not the cause this time. I tried with several mirror options but nothing helped. Strange thing is, when I use my roommate's computer to run the scripts, it worked perfectly(we use the same wifi). And it's my first time running biomaRt, so I start to wonder whether it's something wrong with my R or the package. Do you have any idea about that?

ADD REPLY
0
Entering edit mode

What do you see if you visit the BioMart web interface at https://www.ensembl.org/biomart/martview/ ? Are you able to construct and run a query from there? The biomaRt package is interacting with the same database as the website, and should perform in the same way. If your code works fine on a second computer than it seems possilbe that it's an issue with your initial computer, and going to the website might test that. Your versions of R and biomaRt are up-to-date, I don't see an issue there.

ADD REPLY
0
Entering edit mode

The web interface works just fine, and it did provide the output I'd excepted. Weird. I just cannot think of any possible issue that blocks me from using biomart with R. At least I can use the web version I guess? It's just a little annoying.

ADD REPLY

Login before adding your answer.

Traffic: 987 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6