BioFileCache Problem and not linking to ensembldb problem in TxiMeta
1
1
Entering edit mode
kavator ▴ 30
@kavator-22955
Last seen 22 months ago
Singapore

Hi Mike Coldata was formatted as exactly according to the html tutorial. I have just tried running tximeta(coldata)..it was running until it gives me the following notification..

****#when i select 1 -use default*, Rstudio shows the following error messages**
Error in file(file, ifelse(append, "a", "w")) : 
  cannot open the connection
In addition: Warning messages:
1: In dir.create(tximetaDir) :
  cannot create dir 'C:\Users\LIMPEC~1\AppData\Local\tximeta\tximeta\Cache', reason 'No such file or directory'
2: In file(file, ifelse(append, "a", "w")) :
  cannot open file 'C:\Users\LIMPEC~1\AppData\Local\tximeta\tximeta\Cache/bfcloc.json': No such file or directory
****##note that I am running Rstudio as administrator and my BioFileCache is up till date
**##i then created a new bfc, following messages shown in Rstudio**
> bfc <-BiocFileCache(path)
> bfccache(bfc)
[1] "C:/Users/Google Drive/Phd/Project-based Planning and protocols/LPS Study/LPS bulk RNAseq analysis/rhistory"
> setTximetaBFC(bfccache(bfc))
**## once again same error popped up**
Error in file(file, ifelse(append, "a", "w")) : 
  cannot open the connection
In addition: Warning messages:
1: In dir.create(tximetaDir) :
  cannot create dir 'C:\Users\LIMPEC~1\AppData\Local\tximeta\tximeta\Cache', reason 'No such file or directory'
2: In file(file, ifelse(append, "a", "w")) :
  cannot open file 'C:\Users\LIMPEC~1\AppData\Local\tximeta\tximeta\Cache/bfcloc.json': No such file or directory
--------------------------

**## when i select 2- use temp**
Selection: 2
found matching transcriptome:
[ Ensembl - Mus musculus - release 99 ]
building EnsDb with 'ensembldb' package
Importing GTF file ... trying URL 'ftp://ftp.ensembl.org/pub/release-99/gtf/mus_musculus/Mus_musculus.GRCm38.99.gtf.gz'
Error in download.file(resource(con), destfile) : 
  cannot open URL 'ftp://ftp.ensembl.org/pub/release-99/gtf/mus_musculus/Mus_musculus.GRCm38.99.gtf.gz'
**##therefore i followed the MakelinkTxome function as stated in your tutorial
and manged to get the message 
## saving linkedTxome in bfc (first time)
##i then re-run tximeta(coldata)
but same error persists**
Tximeta BioFileCache Ensembldb • 1.9k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

The first error seems to do with [edited] not being able to write to a directory within a structure that doesn't exist yet. I'll push a fix soon.

The second error could just be that you temporarily couldn’t connect to internet? Can you try the second option again?

ADD COMMENT
0
Entering edit mode

Another thing to try for the first option is, can you assess if you have an AppData directory? This is where R attempts to put package specific files on Windows machines, but maybe you don’t have this directory?

ADD REPLY
0
Entering edit mode

Is there a chance that the call to dir.create() here should have recursive = TRUE?

I have't tried the code above, but just trying to create the cache directory in insolation fails with the same error for me, even if the AppData directory exits e.g.

> dir.create(rappdirs::user_cache_dir('tximeta'))
Warning message:
In dir.create(rappdirs::user_cache_dir("tximeta")) :
  cannot create dir 'C:\Users\MIKESM~1\AppData\Local\tximeta\tximeta\Cache', reason 'No such file or directory'

> dir.exists('C:\\Users\\MIKESM~1\\AppData')
[1] TRUE

However this works fine:

dir.create(rappdirs::user_cache_dir('tximeta'), recursive = TRUE)

It doesn't look like you've touched that code for years, so maybe I'm missing the true problem here - would seem an odd thing to only discover now.

ADD REPLY
0
Entering edit mode

Strange... I’ve used and tested tximeta on Windows before, so not sure what’s up.

What’s your opinion, it feels not optimal to force the rappdirs Windows directory structure. But maybe I should just do as you say here and employ recursive.

ADD REPLY
0
Entering edit mode

Perhaps most of the time something like BiocFileCache::BiocFileCache( 'tximeta' ) has already been called, so the directory structure exists when a user gets to this point? I'm just throwing ideas as I don't really know the standard workflow here.

I'd be inclined to keep using the rappdirs by default (that's what I'm doing in biomaRt), as it sticks with some existing convention where hopefully any kinks have already been ironed out. I've also tried to mirror ExperimentHub etc, so you can override them by setting the environment variable BIOMART_CACHE if you don't like the default - personally I hate $HOME filling up with hidden folders.

ADD REPLY
0
Entering edit mode

Ok I think I’ll follow your advice then with recursive and so help users avoid this issue in the future.

ADD REPLY
0
Entering edit mode

Followed up on this suggestion in v1.5.23, thanks for your feedback Mike.

ADD REPLY
0
Entering edit mode

Re: the first error, I just pushed version 1.5.23 to Bioc and to GitHub.

Could you try this new version? You can install the new version for beta testing with:

library(devtools)
install_github("mikelove/tximeta", dependencies=FALSE)
ADD REPLY
0
Entering edit mode

Hi both, I have been having the exact same problem. I tried both selection 1 and 2 when running tximeta(coldata) and had the same errors. I created the directory C:\Users\shauna\AppData\Local\tximeta\tximeta\Cache but I can no longer get the options when running tximeta(coldata). It might work for me now that I've created the directory but how do I get the options back?

I also tried this in my home directory: path <- “tximeta”; bfc <- BiocFileCache(path, ask = FALSE); bfccache(bfc); setTximetaBFC(bfccache(bfc));

When I try running tximeta(coldata) again I get similar errors:

[ Ensembl - Mus musculus - release 99 ] loading existing EnsDb created: 2020-03-04 11:06:05 Error: Could not connect to database: unable to open database file.

Do you have any suggestions how I can get around this? I'm using v1.5.24 for tximeta.

Thanks, Shauna

ADD REPLY
1
Entering edit mode

The “cannot create dir” problem should be solved, instead you have a database that BiocFileCache thinks is there but has been removed or never created. You can delete the entry in BFC with these instructions:

https://bioconductor.org/packages/devel/bioc/vignettes/tximeta/inst/doc/tximeta.html#errorsconnectingtoadatabase

ADD REPLY
0
Entering edit mode

Thanks for your reply! I couldn't delete the entry in BFC for some reason but I reassigned bfc as BiocFileCache() (the AppData BiocFileCache path) and it worked!

Thanks again.

ADD REPLY
0
Entering edit mode

Please excuse my formatting! First post.

ADD REPLY

Login before adding your answer.

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