edward130603 / BayesSpace

Bayesian model for clustering and enhancing the resolution of spatial gene expression experiments.
http://edward130603.github.io/BayesSpace
Other
96 stars 20 forks source link

There is a problem with getRDS(). #82

Open yzf072 opened 2 years ago

yzf072 commented 2 years ago

Unable to obtain data through getRDS(). I tried the solution to the previous #51 problem. I use the latest version of the tool and directly use the improved code. It still appears: Dataset/sample not available.

alexanderjwhite commented 2 years ago

I've also noticed this issue. Running both the latest bioconductor and CRAN versions.

edward130603 commented 2 years ago

Thanks both for noticing this problem. The admin who manages the cloud storage accidentally changed the permissions for these files. It should be fixed as of ~30 minutes ago. Can you please check again and let me know if still having issues?

alexanderjwhite commented 2 years ago

Thanks, @edward130603; it is working again.

yl883 commented 1 year ago

Hi @edward130603, I've tried to download melanoma data and noticed this issue again.

edward130603 commented 1 year ago

I tried it just now without issue. If you get the cache error:

> getRDS("2018_thrane_melanoma", "ST_mel1_rep2")
Error in BiocFileCache() : 
  DEFUNCT: As of BiocFileCache (>1.15.1), default caching location has changed.
  Problematic cache: C:\Users\EDWARD~1\AppData\Local/BiocFileCache/BiocFileCache/Cache
  See https://www.bioconductor.org/packages/devel/bioc/vignettes/BiocFileCache/inst/doc/BiocFileCache.html#default-caching-location-update

Then try going to the link and follow the instructions there.

yl883 commented 1 year ago

I tried it just now without issue. If you get the cache error:

> getRDS("2018_thrane_melanoma", "ST_mel1_rep2")
Error in BiocFileCache() : 
  DEFUNCT: As of BiocFileCache (>1.15.1), default caching location has changed.
  Problematic cache: C:\Users\EDWARD~1\AppData\Local/BiocFileCache/BiocFileCache/Cache
  See https://www.bioconductor.org/packages/devel/bioc/vignettes/BiocFileCache/inst/doc/BiocFileCache.html#default-caching-location-update

Then try going to the link and follow the instructions there.

Thank you for your reply! The error I got is "Error: Dataset/sample not available" and I installed the package from github using "devtools::install_github("edward130603/BayesSpace"). I tried it just now and still got the same error

edward130603 commented 1 year ago

Is this the command you used for the melanoma sample? getRDS("2018_thrane_melanoma", "ST_mel1_rep2")

yl883 commented 1 year ago

Is this the command you used for the melanoma sample? getRDS("2018_thrane_melanoma", "ST_mel1_rep2")

Yes

edward130603 commented 1 year ago

Can you copy paste your output for these two commands:

> packageVersion("BayesSpace")
[1] ‘1.6.0’
> getRDS
function (dataset, sample, cache = TRUE) 
{
    url <- "https://fh-pi-gottardo-r-eco-public.s3.amazonaws.com/SpatialTranscriptomes/%s/%s.rds"
    url <- sprintf(url, dataset, sample)
    assert_that(url.exists(url), msg = "Dataset/sample not available")
    if (cache) {
        bfc <- BiocFileCache()
        local.path <- bfcrpath(bfc, url)
    }
    else {
        local.path <- tempfile(fileext = ".rds")
        download.file(url, local.path, quiet = TRUE, mode = "wb")
    }
    readRDS(local.path)
}
<bytecode: 0x000001bc15a83250>
<environment: namespace:BayesSpace>
yl883 commented 1 year ago

packageVersion("BayesSpace") [1] ‘1.5.1’ getRDS function(dataset, sample, cache=TRUE) {

url <- "https://fh-pi-gottardo-r.s3.amazonaws.com/SpatialTranscriptomes/%s/%s.rds"
url <- sprintf(url, dataset, sample)
assert_that(url.exists(url), msg="Dataset/sample not available")

if (cache) {
    bfc <- BiocFileCache()
    local.path <- bfcrpath(bfc, url)
} else {
    local.path <- tempfile(fileext=".rds")
    download.file(url, local.path, quiet=TRUE, mode="wb")
}

readRDS(local.path)

} <bytecode: 0x7f7d4849f5e0>

I see. Thank you for the help! Now I know how to make it work!