Entering edit mode
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**
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?
Is there a chance that the call to
dir.create()
here should haverecursive = 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.
However this works fine:
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.
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.
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.Ok I think I’ll follow your advice then with recursive and so help users avoid this issue in the future.
Followed up on this suggestion in v1.5.23, thanks for your feedback Mike.
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:
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
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
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.
Please excuse my formatting! First post.