Trying to load pbmc.RData from Zenodo
Closed this issue · 2 comments
Hi there,
I was trying to follow the tutorials and wanted to look at the data shared on Zenodo but I get an error when I try to load the file. Here's a reproducible example:
Download the data.
mamba create --yes --name zenodo -c conda-forge zenodo_get
mamba activate zenodo
zenodo_get -r 8164711
Title: PBMC datasets for harmony
Keywords:
Publication date: 2023-07-19
DOI: 10.5281/zenodo.8164711
Total size: 132.5 MB
Link: https://zenodo.org/api/records/8164711/files/pbmc_stim.RData/content size: 30.5 MB
100% [........................................................................] 31973441 / 31973441
Checksum is correct. (dab7de4203a0f5bec3ba67d5c1e614c4)
Link: https://zenodo.org/api/records/8164711/files/pbmc.RData/content size: 102.0 MB
100% [......................................................................] 106968050 / 106968050
Checksum is correct. (23b2f9e77a602de4d4bd9c69c1024db0)
All files have been downloaded.
Try to load pbmc.RData
.
docker run --rm -it -v $(pwd):$(pwd) rocker/verse:4.3.2 R -q -e 'load("/home/dtang/tmp/pbmc.RData")'
> load("/home/dtang/tmp/pbmc.RData")
Error in load("/home/dtang/tmp/pbmc.RData") :
bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning messages:
1: In readChar(con, 5L, useBytes = TRUE) :
truncating string with embedded nuls
2: file ‘pbmc.RData’ has magic number 'X'
Use of save versions prior to 2 is deprecated
Execution halted
pbmc_stim.RData
loads fine.
docker run --rm -it -v $(pwd):$(pwd) rocker/verse:4.3.2 R -q -e 'load("/home/dtang/tmp/pbmc_stim.RData")'
Hi @davetang,
Thanks for reporting this. I can reproduce the bug in my environment, also R 4.3.3. It is because R deprecated the old serialization scheme. The files are not corrupt.
There is a workaround.
What I did is the following:
install.packages("readr")
library(Seurat)
readr::read_rds("Downloads/pbmc.RData")
I will look into updating the files but I think Zenodo may make it hard to replace existing files.
Hi @pati-ni,
thank you for the reply and workaround! Regarding Zenodo, I guess you could create a new version?
For the workaround, I get the following error:
library(Seurat)
readr::read_rds("~/work/pbmc.RData")
Error: Please run UpdateSeuratObject on your object
Error during wrapup: no slot of name "images" for this object of class "Seurat"
Error: no more error handlers available (recursive errors?); invoking 'abort' restart
I'm using
packageVersion("Seurat")
[1] ‘5.0.3’
and
packageVersion("SeuratObject")
[1] ‘5.0.1’