HYsxe / PRINT

31 stars 3 forks source link

getPrecomuptedBias error: can't find HDF5 plugin #7

Closed mspivakov closed 1 year ago

mspivakov commented 1 year ago

Hello! I've got hfd5r installed, but I'm getting the following error when running getPrecomputedBias():

project <- getPrecomputedBias(project, nCores = 8)

Error in H5File.open(filename, mode, file_create_pl, file_access_pl) :
HDF5-API Errors:
error #000: H5F.c in H5Fopen(): line 620: unable to open file
class: HDF5
major: File accessibility
minor: Unable to open file

error #001: H5VLcallback.c in H5VL_file_open(): line 3501: failed to iterate over available VOL connector plugins
class: HDF5
major: Virtual Object Layer
minor: Iteration failed

error #002: H5PLpath.c in H5PL__path_table_iterate(): line 578: can't iterate over plugins in plugin path '(null)'
class: HDF5
major: Plugin for dynamically loaded library
minor: Iteration failed

error #003: H5PLpath.c in H5PL__path_table_iterate_process_path(): line 620: can't open directory: /rds/general/user/mikhails/home/anaconda3/envs/print/lib/hdf5/plugin
class: HDF5
major: Plugin for dynamically loaded library
minor: Can't open directory or file

error #004: H5VLcallback.c in H5VL__file_open(): line 3351: open failed
class: HDF

I checked and indeed there's not even an hdf5 folder in that location, let alone the plugin subfolder. Any advice on how to get this to work? Many thanks!

mspivakov commented 1 year ago

Update: I believe I have managed to solve this by the following:

pip install hdf5plugin

Then creating the /rds/general/user/mikhails/home/anaconda3/envs/print/lib/hdf5/plugin folder and copying the files from ./anaconda3/envs/print/lib/python3.8/site-packages/hdf5plugin/plugins/ created by this package to this folder I created.

Update2: the issue I was mentioning in the earlier version of this posting was due to the fact that I forgot to untar/unzip the h5 file ;)

mspivakov commented 1 year ago

Update3: However, I'm now getting the following error:

project <- getPrecomputedBias(project, nCores = 8)
Error in seq.default(1, nData, chunkSize) : invalid '(to - from)/by'
traceback()
7: stop("invalid '(to - from)/by'")
6: seq.default(1, nData, chunkSize)
5: seq(1, nData, chunkSize) at utils.R#291
4: getChunkInterval(regions, chunkSize = chunkSize) at getBias.R#125
3: .local(project, nCores, chunkSize, ...)
2: getPrecomputedBias(project, nCores = 8) at getBias.R#88
1: getPrecomputedBias(project, nCores = 8)

Update4: This was easy to fix. In your tutorial you assume that regionsBed has column names, which it isn't. So this was resolved by the following:

regionsBed <- read.table(paste0(projectDataDir, "BMMCTutorialRegions.bed"))
### Added new command
names(regionsBed)<-c("chr", "start", "end")
mspivakov commented 1 year ago

I've solved the issue now - I suspect my solutions will be useful for other users as well.