sleuth icon indicating copy to clipboard operation
sleuth copied to clipboard

Error in H5Fopen(file, flags = flags, fapl = fapl, native = native) : HDF5. File accessibility. Unable to open file.

Open martalopes5234 opened this issue 2 years ago • 2 comments

Hello,

I am having the same problem:

so <- sleuth_prep(s2c, ~ condition) reading in kallisto results ..Error in H5Fopen(file, "H5F_ACC_RDONLY") : HDF5. File accessability. Unable to open file.

SessionInfo()

R version 4.2.1 (2022-06-23) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.0.1

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale: [1] pt_PT.UTF-8/pt_PT.UTF-8/pt_PT.UTF-8/C/pt_PT.UTF-8/pt_PT.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] BiocManager_1.30.18 rhdf5filters_1.9.0 Rhdf5lib_1.18.2 httr_1.4.4 rhdf5_2.40.0 [6] sleuth_0.30.0 Matrix_1.5-0

loaded via a namespace (and not attached): [1] Rcpp_1.0.9 lattice_0.20-45 prettyunits_1.1.1 ps_1.7.1 rprojroot_2.0.3 [6] assertthat_0.2.1 digest_0.6.29 utf8_1.2.2 mime_0.12 R6_2.5.1 [11] ggplot2_3.3.6 pillar_1.8.1 rlang_1.0.5 curl_4.3.2 lazyeval_0.2.2 [16] rstudioapi_0.14 data.table_1.14.2 miniUI_0.1.1.1 callr_3.7.2 urlchecker_1.0.1 [21] devtools_2.4.4 stringr_1.4.1 htmlwidgets_1.5.4 munsell_0.5.0 shiny_1.7.2 [26] compiler_4.2.1 httpuv_1.6.6 pkgconfig_2.0.3 pkgbuild_1.3.1 htmltools_0.5.3 [31] tidyselect_1.1.2 tibble_3.1.8 fansi_1.0.3 withr_2.5.0 crayon_1.5.1 [36] dplyr_1.0.10 later_1.3.0 grid_4.2.1 xtable_1.8-4 gtable_0.3.1 [41] lifecycle_1.0.2 DBI_1.1.3 magrittr_2.0.3 scales_1.2.1 cli_3.4.0 [46] stringi_1.7.8 cachem_1.0.6 fs_1.5.2 promises_1.2.0.1 remotes_2.4.2 [51] ellipsis_0.3.2 generics_0.1.3 vctrs_0.4.1 tools_4.2.1 glue_1.6.2 [56] purrr_0.3.4 processx_3.7.0 pkgload_1.3.0 parallel_4.2.1 fastmap_1.1.0 [61] colorspace_2.0-3 sessioninfo_1.2.2 memoise_2.0.1 profvis_0.3.7 usethis_2.1.6

macOS Monterey Versão 12.0.1

Kallisto version HDF5 FILES 1.12.2

rhdf5::h5version() This is Bioconductor rhdf5 2.40.0 linking to C-library HDF5 1.10.7 and rhdf5filters 1.9.0

I already tried to look for a more recent rhdf5 package that supports HDF5 FILES 1.12.2 with no success.

How did you solve this issue?

martalopes5234 avatar Sep 15 '22 12:09 martalopes5234

Hi,Have you solved your problem yet?I think I need your help=)

weiyxxx avatar Oct 18 '22 05:10 weiyxxx

I am working through this issue too while setting up new M1 macbook pro. I have been able to reproduce the issue by directly calling the H5Fopen() function to one of the .h5 files I am passing to "path" in my metadata table. Notably, when I move the .h5 file from my external SSD to my local machine I no longer get the error with H5Fopen, so it seems that this issue might relate to the file being on an external drive. I also get the exact same error when using tximport(...,type="kallisto") to read the same .h5 files.

Furthermore, I moved all the .h5 files to my local machine (and edited filepaths in metadata accordingly) and that fixed the problem. Therefore, this seems to a) not be a sleuth issue but instead a rhdf5 issue and b) occur due to the files being located on an external drive, as it can be fixed by moving the files to a local disk. (I suspect it also relates to the m1 mac, as I think I have equivalent sessions setup between my 2016 intel MBP and 2020 m1 MBP and this is only an issue on the m1, but I haven't shown this rigorously)

Long story short: as a quick fix, move the .h5 files to your local disk and edit the "path" strings you pass to sleuth_prep() accordingly. This seems to be a rhdf5 issue, however, so I will keep digging and open an issue over there if I can't find a solution.

Edit 1: this issue is relevant but I'm not smart enough to figure out how to turn it into a solution for us sleuth users: https://github.com/grimbough/Rhdf5lib/issues/11

Notably, none of my above findings changed after running Sys.setenv(HDF5_USE_FILE_LOCKING = "FALSE") in console, but maybe others can try this and report back, as this seems promising based on the issue I linked

Edit 2: this issue seems to have some analog on windows, maybe this will help windows users: https://stackoverflow.com/questions/57131747/reading-h5-file-in-r

Edit 3: I asked about this issue on stackexchange as I couldn't really decide if this is an rhdf5 issue or a computer issue or both: https://stackoverflow.com/questions/74894158/why-can-i-open-hdf5-files-from-local-disk-but-not-external-disk-using-the-rhdf5

briankleiboeker avatar Dec 22 '22 20:12 briankleiboeker