BiomaRt download data error
0
0
Entering edit mode
Max Bone • 0
@2c3c5d53
Last seen 9 months ago
United Kingdom

Im getting the following error even after detaching and re-downloading biomaRt for any functions. Has anyone else been able to resolve this?

> biomaRt::listMarts()

Error in .lock2(dbfile, exclusive = TRUE) : 
  requested an exclusive lock when caller only holds a shared lock
In addition: Warning message:
In dir.create(cache, recursive = TRUE) :
  cannot create dir '/data2/biomart_cache', reason 'No such file or directory'
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'conn' in selecting a method for function 'dbDisconnect': object 'info' not found
biomaRt • 1.3k views
ADD COMMENT
1
Entering edit mode

Do you have a /data2 directory, and do you have write permissions for it?

The error cannot create dir '/data2/biomart_cache', reason 'No such file or directory' seems to imply that the location doesn't exist.

The location for the biomaRt cache can be set with the environment variable BIOMART_CACHE. You can try running the code below, which will set the cache to a temporary folder created by R.

Sys.setenv(BIOMART_CACHE=tempdir())

That's not much use as far as a cache goes, because it will be deleted when you quit R, but if things start working then you can choose a more appropriate location.

ADD REPLY
0
Entering edit mode

Thanks for the response, I've never seen or used a /data2 directory, upon trying your solution i still get the following on the errors:

    Error in .lock2(dbfile, exclusive = TRUE) : 
  requested an exclusive lock when caller only holds a shared lock
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'conn' in selecting a method for function 'dbDisconnect': object 'info' not found

Again it was working fine previously and since re-downloading i still get the same issues.

Also it's my own PC so shouldn't be any issues regarding access.

ADD REPLY
0
Entering edit mode

Well at least changing the location got ride of the warning about there being no such directory, and shows that was not the root problem.

The actual error is coming from the BiocFileCache package (https://github.com/Bioconductor/BiocFileCache/blob/devel/R/sql.R#L13). Maybe shepherl can shed some light on what the .lock2 function is doing and what the error means?

ADD REPLY
0
Entering edit mode

normally the lock prevents two (or more) users from trying to write to the database at once. So while one user has a RW others will only have R until the lock is released.

ADD REPLY
0
Entering edit mode

So might multiple R instances, each running BiocFileCache and trying to write to the database, run into this?

ADD REPLY

Login before adding your answer.

Traffic: 455 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