I have been using biomaRt for some time now and it has been working nicely. However, today while trying to convert some ensembl gene ids to uniprotswissprot ids I have been facing some problems. The code and the error are as follows:
#importing the library library(biomart) #since I am working with thaliana - I create the mart object as follows thaliana_mart = useMart(host="plants.ensembl.org", "plants_mart", dataset = "athaliana_eg_gene") #running a sample code where I want to retrieve a uniprotswissprot id getBM(mart = thaliana_mart, attributes = "uniprotswissprot", values = "AT4G21050", filters = "ensembl_gene_id")
Here I expect to get the uniprotswissprot id - Q9SUA9 which is corresponding to AT4G21050, however, I get the following error.
Error in result_create(conn@ptr, statement) : no such table: metadata
Also, something that I should mention : I make requests in bulk. This piece of code is a part of a larger code which runs through 25 ids at a time and does a bunch of other functions. In order to not over-shoot the limit of 55000 requests per hour by ensembl's REST-API, I put the code to "sleep" after one batch of 25 ids for 1800 seconds (half hour).
Can anyone please help me?
Hi Kevin, thanks for your answer. I agree this would be an efficient way of doing things instead of sending in requests one at a time, however, the point that I would like to make is that I am not able to send in any requests at the moment. For example, even when I run your code I still get the same error as I stated in the question, and I am not entirely sure what the error message means. Here I paste it again:
Edit : forgot to add that I have tried to uninstall and reinstall the biomaRt package, however this error still persists
I see. That specific error is thrown from an SQL command. On which system and R version are you running biomaRt?
Also, what would be the output of
biomartCacheInfo()if you ran it?
I am running this on a Debian system, to make things easier to understand, here is the sessionInfo()
And if I run biomartCacheInfo(), I still get the same error:
Is there something that I did wrong? I also tried making a fresh install of my entire R environment but the error still persists.